Help for the first steps ?

Post Reply
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Help for the first steps ?

Post by ezee »

Hi .

I try to code some python scripts inside VS , but the compilation fails because of unreachable modules ( VS and Director )

I've read that they depend on c++ code , so i guess VS must be running in order to
run the scripts ?

Other fail : I created a folder AIML in Modules , but the stderr show no trace of it :

Code: Select all

sys.path = [r"C:\Program Files\Vega Strike\modules\builtin",r"C:\Program Files\Vega Strike\modules\quests",r"C:\Program Files\Vega Strike\modules\missions",r"C:\Program Files\Vega Strike\modules\ai",r"C:\Program Files\Vega Strike\modules",r"C:\Program Files\Vega Strike\bases"] + sys.path
mmm... i've checked the c++ side , it's hardcoded :
http://spacetechs.free.fr/VEGASTRIKEDEV ... tml#l00782
Could you please give me some instructions ?
( my VS_VC9 don't compile also ( bad reference to Boost 1.45) , so i'm stuck . Sadly :roll: )
( how do you proceed ? )
I use winxp with Pyscripter .

Thank you .

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Help for the first steps ?

Post by TBeholder »

Yup, there are callbacks.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Help for the first steps ?

Post by ezee »

Okay .
But how do you test your scripts ?
What is the procedure that you use to compile your engine's python scripts ?
A quick setup tutorial please ?
:)

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Help for the first steps ?

Post by TBeholder »

Embedded scripts? Let the engine care about it - if all is set up correctly, you should never need to worry about compiling, and if not, they probably won't execute properly anyway. I used to delete data/modules/*.pyc after updates/reinstallations of OS or lesser system stuff, they get generated the next time you run VS. Probably a healthy thing to do at least after Python updates.

As to the testing - no idea. I don't know how to debug anything embedded at all, other than testing it in normal usage, at most with a few extra output commands at critical points to see where data will be wrong. Then again, it's Python and mostly rather plain code. As long as it doesn't throws errors and there's no mess with identifiers ("afterburn evade" bug did fall under both), everything should be fine.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Help for the first steps ?

Post by ezee »

mmm...
Okay .

But i feel like i miss something .
I will continue to experiment and learn .
Thank you TBeholder !
:)

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Help for the first steps ?

Post by TBeholder »

AFAIK, Python is used as mountable library (rather than exec). Obviously, relevant libraries should be present, but VS also should know paths to them - ccmake does it in Linux (INCLUDE_DIR, PYTHON_INCLUDE_DIR2, PYTHON_LIBRARY, PYTHON_LIBRARY_DEBUG - this one NOTFOUND for me), no idea what configures Windoze projects. Then again, PATH (as in, environment variable) probably would do the trick either way.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Help for the first steps ?

Post by ezee »

PATH (as in, environment variable) probably would do the trick either way.
Yeah , i will try to tweak that , thx .
I've read that VisualStudio is able to compile python today ( or just serve as ide , i must verify - ok i check now -> http://stackoverflow.com/questions/1422 ... -installed) .

Ouch , that is so hard to program for vegastrike !
:lol:

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
Post Reply