Interested in hacking some Python

Need help testing contributed art or code or having trouble getting your newest additions into game compatible format? Confused by changes to data formats? Reading through source and wondering what the developers were thinking when they wrote something? Need "how-to" style guidance for messing with VS internals? This is probably the right forum.
Post Reply
Mark Williamson
Explorer
Explorer
Posts: 12
Joined: Thu Feb 07, 2008 2:09 am

Interested in hacking some Python

Post by Mark Williamson »

Hi all

The following Wiki page:
http://vegastrike.sourceforge.net/wiki/HowTo:Contribute

says that scripting work needs doing in Python and suggests contacting the developers for more information. I've seen a few other folks asking Python questions here, so I know there are other people working in this area.

Anyhow, Vega Strike is awesome, I think it's great for Free Software for there to be quality games and also it's just a fantastic way of using up spare time ;)

I'm interested in trying to help out a bit. I've done a fair bit of Python programming in the past, I've also got experience with the Python <-> C modules API. I've hacked a lot of low level C in the past but I don't know much about graphics stuff. Therefore, I figure the place I could most easily contribute something is in scripting.

So ... are there any todos, fun little projects or otherwise worthwhile things that I could take a look at contributing something on? At the very least, I can transfer any suggested projects from here to the Wiki for you so that future people won't have to come here to ask the question ;)

Cheers,
Mark
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

Welcome Mark Williamson yeah lots of twisty Python in need of straighting out but as to which have priority not sure one of the devs should be buy and point you to something in immediate need :wink:

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Hi,
Cool to see someone interested in python hacking.

As to what to do--There are so many cool things you can do with scripting.
When you play is there anything you would like to see?

I'm working on multiplayer and there are some server-side scripts that could be developed.
One thing that isn't done yet is to create a mission or some other system to bounty hunt other players.
You can add trading cargo items or money with people docked at the base, which is something I have wanted to do.

If you don't know what a function does or would like to do something but don't know how ask here.


As to engine code, it's all C++, but you can probably understand it if there's something there that you want to work on.
Mark Williamson
Explorer
Explorer
Posts: 12
Joined: Thu Feb 07, 2008 2:09 am

Post by Mark Williamson »

ace123 wrote:Hi,
Cool to see someone interested in python hacking.
Python is a breath of fresh air to me right now. A nice combination of pragmatically useful stuff, the cool stuff from functional programming languages and easy hackability. I've programmed Python quite a bit in the past but recently I've been doing a lot more stuff. It makes me :) when C makes me. :(
As to what to do--There are so many cool things you can do with scripting.
When you play is there anything you would like to see?
I actually haven't played regularly for a while, I'm just getting back to looking at the game. Just installed the beta of 0.5 (well, the SVN checkout actually, since I'm Linuxing). It looks really cool.

Took me just a little while to figure out where all the Python goodness actually lived but now I'm taking a look through the code. I really need to try to understand the boundary between scripting and the core engine, so that I know what I can achieve in pure Python. I guess I don't mind dipping into the engine code in principle but it'll be a lot slower going for me if I do, so I'm trying to avoid it ;)

I guess I could initially play with engineering some more (types of?) missions. Also, it'd be nice to somehow enhance the feeling of dynamic universe somehow... maybe (if not done already) by having other ships tell you rumours of stuff, or relay information about bits of news.
I'm working on multiplayer and there are some server-side scripts that could be developed.
One thing that isn't done yet is to create a mission or some other system to bounty hunt other players.
You can add trading cargo items or money with people docked at the base, which is something I have wanted to do.
Right now I'm just looking for something very simple, but maybe I could have a look at any existing multiplayer scripts and see how it works. Are they in the SVN somewhere too?
If you don't know what a function does or would like to do something but don't know how ask here.


As to engine code, it's all C++, but you can probably understand it if there's something there that you want to work on.
Cool, thanks very much for the input.

I'm highly open to suggestions as to projects at this point, so I'd be glad to hear ideas and advice from anybody who wants the Python improved somehow ;)
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Post by pyramid »

Mark, welcome to the community. Your willingness to contribute is greatly welcome.
If I had not the graphics improvement part ongoing I would definitely jump first into missions. There is only one story mission (with Janek) scripted till now, and it's incomplete/broken. This part is really missing for the game to become much more attractive. This would be easy to achieve since the scripting is hermetically separated from the engine code. The backdrop however is that the story is not yet written so you'll have no reference as for how to proceed with this particular mission (or any other relating with the overall universe storyline). If this is still your choice, I'd definitely recommend contacting jackS, the metal father of the universe.

My other suggestions would go along your proposal.
For one, the communication between ships is monotone. Always the same "would you blast a pirate...", "i didn't mean any trouble.." and the like. I believe the framework is in place to make communication at least faction dependent, if not unit&faction dependent.
When looking through the news, you can always see the same date for the news publishing time. Unfortunately this kind of behavior deducts from the believability of the universe and would require polishing. Amount of different news could also be enhanced (but that again is a question of storyline).
Next, I could think of adding more variety of mission types besides the cargo, patrol, defense. The missions could be of explorer/science/research type and the storyline enclosed in itself and thus not depending on the flow of the global universe events.
I will just mention the UI part for completeness. Current interfaces on planets/stations/ships have received sufficient complaints to climb the priority agenda and I believe it's no way should wait for the ogre port. My personal opinion only. Since you have mentioned graphics is not your ace, please consider or discard it to your liking.

Hope that helps.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

All mission-related, universe-related stuff is in the modules folder in data4.x.
most base-related scripts are in bases.

For examples of missions, look in bounty.py or cargo_mission.py

There isn't much done yet in the server scripts. If you look in server_lib.py
Mark Williamson
Explorer
Explorer
Posts: 12
Joined: Thu Feb 07, 2008 2:09 am

Post by Mark Williamson »

pyramid wrote:Mark, welcome to the community. Your willingness to contribute is greatly welcome.
If I had not the graphics improvement part ongoing I would definitely jump first into missions. There is only one story mission (with Janek) scripted till now, and it's incomplete/broken. This part is really missing for the game to become much more attractive.
OK, I've had a bit of a play of the Janek mission and a glance through the campaign code for it. Looks relatively straightforward although I'm doubtless missing some subtleties of how it all hangs together.
This would be easy to achieve since the scripting is hermetically separated from the engine code. The backdrop however is that the story is not yet written so you'll have no reference as for how to proceed with this particular mission (or any other relating with the overall universe storyline). If this is still your choice, I'd definitely recommend contacting jackS, the metal father of the universe.
OK. Perhaps it would be good to get some brainstorming going regarding storylines, or something? If there are storylines recorded somewhere (e.g. the wiki or in SVN) then people such as myself could implement them at their leisure.

A related topic I guess would be the "quests" I've found in the scripts. These look interesting and like they'd provide another plot dimension for the game to evolve in. For some reason they're mostly disabled, though. Can anyone comment on this? Do they work? Do they need debugging or playtesting? Are they a direction people are still interested in going?
My other suggestions would go along your proposal.
For one, the communication between ships is monotone. Always the same "would you blast a pirate...", "i didn't mean any trouble.." and the like. I believe the framework is in place to make communication at least faction dependent, if not unit&faction dependent.
Yes. It'd be nice to get more variation in there. The SVN code seems to have a much more dynamic-feeling universe than the last release, which is something I'm really glad to see. Ships are zooming all over the place, even in Cephid 17, where you start out. The impression of a living universe could be enhanced with a bit more radio chatter, perhaps with the ships in question accompanying you in formation whilst they exchange gossip, or whatever (side note: perhaps they could sometimes drop hints that'd lead you into discovering useful trade routes, or floating cargo, or ambushes? That way it'd still be worth the goal-oriented player listening to this chatter).

I'm not clear how much of the communication or ship AI is handled in scripting vs in the core engine. Can I do the sort of stuff I'm thinking of just in Python, or would I need to delve into the C++ (which raises the cost of entry a bit for me)?
When looking through the news, you can always see the same date for the news publishing time. Unfortunately this kind of behavior deducts from the believability of the universe and would require polishing. Amount of different news could also be enhanced (but that again is a question of storyline).
Ok, I'll bear that in mind.
Next, I could think of adding more variety of mission types besides the cargo, patrol, defense. The missions could be of explorer/science/research type and the storyline enclosed in itself and thus not depending on the flow of the global universe events.
Yep. Any suggestions, from any members of the community, regarding cool missions would be appreciated here - if you have a cool idea but don't want to / can't code, now would be a good place to mention it.
I will just mention the UI part for completeness. Current interfaces on planets/stations/ships have received sufficient complaints to climb the priority agenda and I believe it's no way should wait for the ogre port. My personal opinion only. Since you have mentioned graphics is not your ace, please consider or discard it to your liking.
The point and click interfaces are quite pretty but they're not always that easy to use. I can think of ways in which they could be made better but I'm not sure they're a great fit for my skills. I do GUI programming occasionally, but I also like (virtually) blowing things up!
Hope that helps.
Yes, definitely! Since i started this thread I've been enjoying the new features in SVN, thinking on what I could hack on and looking through the existing Python to get a feel for what's there. Now I just need to decide ;)
jackS
Minister of Information
Minister of Information
Posts: 1895
Joined: Fri Jan 31, 2003 9:40 pm
Location: The land of tenure (and diaper changes)

Post by jackS »

Drop me a PM with your preferred e-mail address and I'll forward you a copy of the Universe Development documentation.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

IMO, it could be worthwhile to have conversion done in Python.
There's no good reason that it can't be done there.
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

Post by pyramid »

Mark Williamson wrote:Perhaps it would be good to get some brainstorming going regarding storylines, or something? If there are storylines recorded somewhere (e.g. the wiki or in SVN) then people such as myself could implement them at their leisure.
Unfortunately this doesn't seem to be the case. I would suggest the Artwork & Content Vetting forum for the discussion and creation of storyline content.
As for the wiki, the predestined place to keep such storylines seems to be the Quests & Campaigns development page which, to my mourning, is devoid of content and thus a mere placeholder waiting to be filled.

One point I am not entirely sure about, is to which extent campaign or mission content related to the universe progression can be discussed publicly without giving away the surprises for the player and thus spoiling the curiosity that motivates any progression of the in-game character. (@jackS: A general guideline as to this point would be recommended and appreciated.)

Not by far being even the least versed story writer, my suggestion for further development of this particular content type would be composed of:
* finding of a volunteer to coordinate the mission story writing, a kind of lead story developer
* who would then "call for mission stoylines", and collect, co-develop, document, and administer those on the above mentioned wiki page.
* further coordinate the content development of campaign storylines between the writers and jackS (concerning the (spoiler/non-spoiler) parts that should/should not be documented and published in the wiki).
jackS
Minister of Information
Minister of Information
Posts: 1895
Joined: Fri Jan 31, 2003 9:40 pm
Location: The land of tenure (and diaper changes)

Post by jackS »

pyramid wrote:
Mark Williamson wrote:Perhaps it would be good to get some brainstorming going regarding storylines, or something? If there are storylines recorded somewhere (e.g. the wiki or in SVN) then people such as myself could implement them at their leisure.
Unfortunately this doesn't seem to be the case. I would suggest the Artwork & Content Vetting forum for the discussion and creation of storyline content.
As for the wiki, the predestined place to keep such storylines seems to be the Quests & Campaigns development page which, to my mourning, is devoid of content and thus a mere placeholder waiting to be filled.

One point I am not entirely sure about, is to which extent campaign or mission content related to the universe progression can be discussed publicly without giving away the surprises for the player and thus spoiling the curiosity that motivates any progression of the in-game character. (@jackS: A general guideline as to this point would be recommended and appreciated.)

Not by far being even the least versed story writer, my suggestion for further development of this particular content type would be composed of:
* finding of a volunteer to coordinate the mission story writing, a kind of lead story developer
* who would then "call for mission stoylines", and collect, co-develop, document, and administer those on the above mentioned wiki page.
* further coordinate the content development of campaign storylines between the writers and jackS (concerning the (spoiler/non-spoiler) parts that should/should not be documented and published in the wiki).
So, I'm a little pressed for time at the moment (and will be for the next several weeks -- thesis proposal==time-consuming) but perhaps the easiest thing to do that maintains the opt-in nature of exposure, not only to spoilers but to pre-vetted, half-finished ideas that may prove more confusing than helpful (and difficult to eradicate as perceived actualities) if they don't end up becoming part of the canon, etc. is for me to create an "Authoring" forum with read permissions set by group (and defaulting to NO), and sticky a sign-up thread in this forum.
jackS
Minister of Information
Minister of Information
Posts: 1895
Joined: Fri Jan 31, 2003 9:40 pm
Location: The land of tenure (and diaper changes)

Post by jackS »

okiedoke. For the moment, see: Red Pill signup thread

Eventually, we should probably create a separate wiki partition or something similarly collaborative in more convenient fashion than a forum, but I have neither time nor finesse of web-mastery to undertake a project along those lines at the moment.
Mark Williamson
Explorer
Explorer
Posts: 12
Joined: Thu Feb 07, 2008 2:09 am

Post by Mark Williamson »

OK, I've been digging through the existing scripts and looking at some of the example mission scripts...

I'm taking a look at data4.4/modules/spawner.py which (as far as I can tell!) is intended to just be a basic demo of some scripting capabilities and the game's combat features.

My understanding currently is that the code should create a line of jump gates, each of which should spawn a different kind of ship if I fly close to it...

Problem: VS.launchJumppoint() seems to create planets instead of jump points :shock: I can't really figure out why that's happening; presumably the semantics of the launchJumppoint() command changed since the script was originally written? Anyhow, unfortunately I've not been able to make out what the correct incantation would be ;)

Once I've got this nailed down I'll submit a patch to do some cleanup in that file, if wanted. I've been doing a bit of janitorial Python editting.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

That /spawner.py is probably not working correctly because spawning has changed it no longer exists as such to may complaints of that @#^%%Clydesdale just spawned in my face :wink: so now all ships are created when you enter the system.One of the dev should be able to be more definitive on this.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

That file isn't really used... it was at one point around for purposes of testing different units. I think that has suffered from code rot. The semantics of launchJumppoint probably has changed since the time that was written.
Post Reply