Vega Strike python help

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
Snake75
Explorer
Explorer
Posts: 14
Joined: Tue Aug 28, 2007 9:42 pm

Vega Strike python help

Post by Snake75 »

I try to modify Fixers code in order to have the common code for RandomFixers, CampaignFixers and BarTenders.

When i select a Fixer (or Bartender) the code call Base.Python() in order to launch a new Python script.
Is there a way to refer the Fixer that I select in new python script ?

Is the second param of Base.Python() an ID for the "link" to python script ? If it is true, how can i point this "link" in the new python script ?

thanks to all
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 »

No it's the last argument (or second to last, depending on which function)

Depending on they way the argument is formatted, it could either be a name of a python file (like

The second argument is only an identification so that it knows which link to delete after you click on it... say, bases/fixers/generic0.py (fixer 0 information) or generic0b.py (fixer 0 acceptance) or no.py (fixer decline)
Snake75
Explorer
Explorer
Posts: 14
Joined: Tue Aug 28, 2007 9:42 pm

Post by Snake75 »

Thanks for info

So, i understand that there is no way to know wich links was selected when a python script is loaded ... isn't it ?
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 »

there is if you instead put a string of python code rather than a python file to execute. I think you have to start it with a "#\n"... look around for examples of doing this.

Then, you can insert text in a string in that python code like 0 for no and 1 for yes.. and otherwise make the code the same (such as by importing a file)

The fixers might have been created before this method was added.
Snake75
Explorer
Explorer
Posts: 14
Joined: Tue Aug 28, 2007 9:42 pm

Post by Snake75 »

Thanks for help ace123

I try to use your suggestion and i have some good result. nothing to release yet, but good results :D
Post Reply