vegastrike -m mod does not work

Find any bugs in Vega Strike? See if someone has already found it, or report them here!
Post Reply
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

vegastrike -m mod does not work

Post by legine »

Hi,

Game fails with

Code: Select all

vegastrike-32: ../src/easydom.h:133: domNodeType* easyDomFactory<domNodeType>::LoadXML(const char*) [with domNodeType = missionNode]: Assertion `length > 8' failed.
when useing a -m modifier at startup
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: vegastrike -m mod does not work

Post by ace123 »

Do not put a space between the "-m" and the mod name. (vegastrike -mmymod for the "mymod" mod)

If you put a space it will interpret your mod argument as the name of a mission.
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Re: vegastrike -m mod does not work

Post by legine »

yes. *bump*

One step forward 2 steps back.
Now I see following very odd output:

Code: Select all

Found MODDIR = G:\workspace\Vega Strike\piarmada-1.0_win_ver/mods
WARNING : coudn't find a mod named 'piarmada' in homedir/mods
CONFIGFILE - Found a config file in mods directory, using : G:\workspace\Vega Strike\piarmada-1.0_win_ver/mods/piarmada/vegastrike.config
Using Mod Directory G:\workspace\Vega Strike\piarmada-1.0_win_ver/mods
As you see there is this warning about the modfolder is not there, but then it loads the config file I put exactly in the unfound folder. (I currently use the Windows 0.5 Version here... )

well next it complains on the missing mission file I put in the piarmada folder. so that is not found either.
Maybe this is related dono.

ty ace123 for your patience :mrgreen:
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: vegastrike -m mod does not work

Post by ace123 »

the homedir/mods is about your ".vegastrike" directory. If you want mod-specific files in there, you need to put it in ".vegastrike/mods/pirarmada". This is mostly only useful for Linux and Mac users so don't worry about it.

But the "Found a config file in mods directory, using : G:\workspace\Vega Strike\piarmada-1.0_win_ver/mods/piarmada/vegastrike.config" means your mod is loading the correct vegastrike.config, so all settings should get loaded properly.

"well next it complains on the missing mission file I put in the piarmada folder. so that is not found either." Can you paste the whole output? You sure you put it in mods/piramada/mission/something.mission"?
You may need to specify the mission name on the command line, like "vegastrike -mpiarmada something.mission"
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Re: vegastrike -m mod does not work

Post by legine »

"well next it complains on the missing mission file I put in the piarmada folder. so that is not found either." Can you paste the whole output? You sure you put it in mods/piramada/mission/something.mission"?
Yes I am sure. I checked again and yes no typos.
  • Using .vegastrike-0.5.0 as the home directory
    Found MODDIR = G:\workspace\Vega Strike\piarmada-1.0_win_ver/mods
    WARNING : coudn't find a mod named 'piarmada' in homedir/mods
    CONFIGFILE - Found a config file in mods directory, using : G:\workspace\Vega Strike\piarmada-1.0_win_ver/mods/piarmada/vegastrike.config
    Using Mod Directory G:\workspace\Vega Strike\piarmada-1.0_win_ver/mods
    DATADIR - No datadir specified in config file, using ; G:\workspace\Vega Strike\piarmada-1.0_win_ver
    SIMULATION_ATOM: 0.05
    ['G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\bin\\python25.zip', '.\\DLLs', '.\\lib', '.\\lib\\plat-win', '.\\lib\\lib-tk', 'G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\bin']
    ['G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\modules\\builtin', 'G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\modules', 'G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\bases']
    Setting Screen to w 1024 h 768 and pitch of 4096 and 32 bpp 4 bytes per pix mode
    0 joysticks were found.
    [...]
I took the basic vegastrike.config and only changed the mission type.
This is mostly only useful for Linux and Mac users so don't worry about it.
Hmm okay. What files can I locate there? It looks like the place for save games.

Okay and here is the rest of the stdout:
  • The names of the joysticks are:
    Reading from socket 7
    FactionXML:LoadXML factions.xml
    Contents of star system:
    <system name="Empty" background="backgrounds/black" nearstars="0" stars="0" starspread="0" y="0" z="0" x="0">

    </system>



    refusing to bind command to joystick (joy-nr too high)
    CREATING A LOCAL SHIP : dumbfire
    Hi helper play 0
    HereInitializing optimizer
    pox 119990000000.000000 -9000000.000000 -109990000000.000000
    Force feedback support disabled when compiled
    Loading completed, now network init
    Loading active missions True
    IS NOW AT Special/Empty

    Launching bases for Special/Empty
    Launching units for Special/Empty
    conditioning
    nonzeroing
    finding quest
    quest_drone
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: vegastrike -m mod does not work

Post by ace123 »

What you pasted looks like completely normal output. (did you look at stderr.txt as well?)

Can you explain the exact problem? Does VS crash when you load it with a mod? Does it act like you ran it without a mod argument?

One thing you can try is to make an empty folder called "mods" inside of .vegastrike, and then make an empty folder called "piarmada" inside of the mods folder.
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Re: vegastrike -m mod does not work

Post by legine »

hmm oki if that looks fine. I think I just live in another galaxy. :)
My sterr is
  • ARG #1 = -mpiarmada
    GOT SUBDIR ARG = piarmada
    Found data in ..
    Using G:\workspace\Vega Strike\piarmada-1.0_win_ver as data directory
    USING HOMEDIR : G:\workspace\Vega Strike\piarmada-1.0_win_ver/.vegastrike-0.5.0 As the home directory
    MISSION_NAME is empty using : piarmada.mission
    'import site' failed; use -v for traceback
    running import sys
    print sys.path
    sys.path = [r"G:\workspace\Vega Strike\piarmada-1.0_win_ver\modules\builtin",r"G:\workspace\Vega Strike\piarmada-1.0_win_ver\modules",r"G:\workspace\Vega Strike\piarmada-1.0_win_ver\bases"]
    testing VS randomrunning import sys
    print sys.path
    OpenGL Extensions supported: GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_blend_color GL_EXT_abgr GL_EXT_texture3D GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_SGIS_texture_edge_clamp GL_SGIS_generate_mipmap GL_EXT_draw_range_elements GL_SGIS_texture_lod GL_EXT_rescale_normal GL_EXT_packed_pixels GL_EXT_separate_specular_color GL_ARB_multitexture GL_EXT_texture_env_combine GL_EXT_bgra GL_EXT_blend_func_separate GL_EXT_secondary_color GL_EXT_fog_coord GL_EXT_texture_env_add GL_ARB_texture_cube_map GL_ARB_transpose_matrix GL_ARB_texture_env_add GL_IBM_texture_mirrored_repeat GL_EXT_multi_draw_arrays GL_NV_blend_square GL_ARB_texture_compression GL_3DFX_texture_compression_FXT1 GL_EXT_texture_filter_anisotropic GL_ARB_texture_border_clamp GL_ARB_point_parameters GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_env_crossbar GL_EXT_texture_compression_s3tc GL_ARB_shadow GL_ARB_window_pos GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_ARB_vertex_program GL_EXT_texture_rectangle GL_ARB_fragment_program GL_EXT_stencil_two_side GL_ATI_separate_stencil GL_ARB_vertex_buffer_object GL_EXT_texture_lod_bias GL_ARB_occlusion_query GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_non_power_of_two GL_ARB_vertex_shader GL_NV_texgen_reflection GL_ARB_point_sprite GL_EXT_blend_equation_separate GL_ARB_depth_texture GL_ARB_texture_rectangle GL_ARB_draw_buffers GL_ARB_pixel_buffer_object GL_WIN_swap_hint GL_EXT_framebuffer_object
    OpenGL::GL_EXT_compiled_vertex_array unsupported
    OpenGL::Accurate Fog Distance unsupported
    OpenGL::Generic Texture Compression supported
    OpenGL::S3TC Texture Compression supported
    OpenGL::Multitexture supported (8 units)
    OpenGL::TextureCubeMapExt supported
    OpenGL::S3TC Texture Clamp-to-Edge supported
    OpenGL::S3TC Texture Clamp-to-Border supported
    No errors.

    No errors.

    No errors.

    No errors.

    ERROR: 0:93: 'texture2DLod' : no matching overloaded function found
    ERROR: 0:93: 'rgb' : field selection requires structure, vector, or matrix on left hand side


    Fragment Program Error: Failed to compile highend
    No errors.

    No errors.

    No errors.

    OpenGL::EXTColorTable unsupported
    Min (0.000000, 0.000000, 0.000000) Max(0.000000, 0.000000, 0.000000) MinLumin 1.000000, MaxLumin 1.000000Read In Star Count 0 used: 2000
    Min (0.000000, 0.000000, 0.000000) Max(0.000000, 0.000000, 0.000000) MinLumin 1.000000, MaxLumin 1.000000Read In Star Count 0 used: 38
    Loading a starsystem
    Loading Star System Special/EmptyFOUND MODIFICATION = player FOR PLAYER #0
    warning: Not importing directory 'G:\workspace\Vega Strike\piarmada-1.0_win_ver\bases\fixers': missing __init__.py
    Traceback (most recent call last):
    File "piarmada_menunightprivateer.py", line 13, in <module>
    TypeError: this constructor takes no arguments
    ERROR: there are no rooms in basefile "piarmada_menunight.py" ...
why do I need a File "piarmada_menunightprivateer.py"? I only wanted to call "piarmada_menu.py". I hate automatism. They do odd stuff. :(
Ill check maybe I have overlooked a switch.
RedAdder
Bounty Hunter
Bounty Hunter
Posts: 149
Joined: Sat Jan 03, 2009 8:11 pm
Location: Germany, Munich
Contact:

Re: vegastrike -m mod does not work

Post by RedAdder »

Weird I'm missing main_menunightprivateer.py. Maybe i should update my svn copy, I might find some goodies.
RedAdder
Bounty Hunter
Bounty Hunter
Posts: 149
Joined: Sat Jan 03, 2009 8:11 pm
Location: Germany, Munich
Contact:

Re: vegastrike -m mod does not work

Post by RedAdder »

Bear with me I'm basically thinking aloud:

Thie error message is due to this line in cmd/base_xml.cpp:

string compilefile = string(filename)+time_of_day_hint+string(faction)+BASE_EXTENSION;
For me, the error isn't fixed by checking out the bases/ directory, which contains the .py files.

Now if I understood what PyRun_SimpleFile(f, p) does and why it needs two arguments, I could give a sensible comment on this ;-) My suspicion is that p is the name of the file the python is compiled to?

After checking which file f points to, I think that the code is correct: f does point to the longest filename "matching" the parts in compilefile with _ in between, and the handle p which also appears in the exception is no real file name.

There is a warning regarding FILE * in http://docs.python.org/c-api/veryhigh.html
This probably means I need a VC++ 2005 compiled version of the python25d-vc7.dll but that is what the "vc7" in the filename is for 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:

Re: vegastrike -m mod does not work

Post by ace123 »

Don't try to read too deeply into this error message. That "nightprivateer" thing is a bug in whatever calles PyRun_SimpleFile, as RedAddr suggests. I've seen that printed a lot--some bases can use different python files depending on day/sunset/night, and you can also make faction-specific bases.
I suspect that some function just passed a FILE* does a bad job of recomputing the filename.

Anyway the file it refers to is definitely "piarmada_menu.py" or some variant on that.
The important thing is this part:

Code: Select all

..., line 13, in <module>
TypeError: this constructor takes no arguments
So on line 13 in whatever file it decided to load (something containing "piarmada_menu"), something decided to call a constructor with one argument too many? Or else in your definition of the __init__() function you forgot to include 'self' argument.

I can't tell you any more than that without the source code, but the error is definitely in python.
In the future, you only need to post the error log starting at the line saying "Traceback (most recent call last):"
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: vegastrike -m mod does not work

Post by ace123 »

Interesting that you mention the FILE* thing--that may be something to watch out when it comes to compatibility. In fact it may be the reason I keep getting a segmentation fault in python code when running Vega Strike on VC++ 2008 Express--since I'm using libraries compiled for 2005.

I can't find any versions of PyRun_SimpleFile() that take a string instead of a file*--but I might be able to do:

Code: Select all

fileobject = PyFile_FromString(filename, "rt");
PyRun_SimpleFile(PyFile_AsFile(fileobject), filename);
Py_DECREF(fileobject);
In fact I found some references to this exact series of function calls on a couple of mailing lists so it may be the "correct" way of running a file in python. I'm going to try this out next time I boot into windows and see if this solves the VC++ 2008 crash.
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Re: vegastrike -m mod does not work

Post by legine »

Ahh I see. Thats the error. Thanks. I keep always forgetting the self argument. :)

Edit:
I dont have a clue what this Message is trying to tell me.
But I think it is a new Topic. I open up another Thread under new Topic

Edit2:
Okay, all is a bit weired at the moment. Seems like I have done something wrong and got an wrong Output.

I have started over. That was the Steps I did:
1) makeing a mods folder
2) adding piarmada folder
3) adding vegastrike.conf to the piarmada folder
4) changed
  • <var name="default_mission" value="main_menu.mission"/>
to
  • <var name="default_mission" value="piarmada.mission"/>
5) makeing a mission folder in piarmada
6) copy main_menu.mission as piarmada.mission into the mission folder.
7) adjusting the piarmada.mission to start my piarmada_menu.py fromt the base folder (see below)
8) adding base dir to piarmada
9) adding a piarmada_menu.py file
10) add the line

Code: Select all

print "DEBUG --> my first base"
I expect now that I get some errors about missing room in my base, but that I see an Output in the default log which says: DEBUG --> my first base
Instead I get:
  • Windows version 5 1
    Vega Strike
    See http://www.gnu.org/copyleft/gpl.html for license details.

    Using .vegastrike-0.5.0 as the home directory
    Found MODDIR = C:\Dokumente und Einstellungen\cthcon24\Desktop\Vega Strike\piarmada-1.0_win_ver/mods
    WARNING : coudn't find a mod named 'piarmada' in homedir/mods
    CONFIGFILE - Found a config file in mods directory, using : C:\Dokumente und Einstellungen\cthcon24\Desktop\Vega Strike\piarmada-1.0_win_ver/mods/piarmada/vegastrike.config
    Using Mod Directory C:\Dokumente und Einstellungen\cthcon24\Desktop\Vega Strike\piarmada-1.0_win_ver/mods
    DATADIR - No datadir specified in config file, using ; C:\Dokumente und Einstellungen\cthcon24\Desktop\Vega Strike\piarmada-1.0_win_ver
    SIMULATION_ATOM: 0.05
    ['C:\\Dokumente und Einstellungen\\cthcon24\\Desktop\\Vega Strike\\piarmada-1.0_win_ver\\bin\\python25.zip', '.\\DLLs', '.\\lib', '.\\lib\\plat-win', '.\\lib\\lib-tk', 'C:\\Dokumente und Einstellungen\\cthcon24\\Desktop\\Vega Strike\\piarmada-1.0_win_ver\\bin']
    ['C:\\Dokumente und Einstellungen\\cthcon24\\Desktop\\Vega Strike\\piarmada-1.0_win_ver\\modules\\builtin', 'C:\\Dokumente und Einstellungen\\cthcon24\\Desktop\\Vega Strike\\piarmada-1.0_win_ver\\modules', 'C:\\Dokumente und Einstellungen\\cthcon24\\Desktop\\Vega Strike\\piarmada-1.0_win_ver\\bases']
    Setting Screen to w 800 h 600 and pitch of 3200 and 32 bpp 4 bytes per pix mode
    0 joysticks were found.

    The names of the joysticks are:
    Reading from socket 7
    FactionXML:LoadXML factions.xml
    Panic exit - mission file piarmada.mission not found
Anything I have done wrong? :?: (i have checked spelling, and tried to launch vegastrike -mpiarmada piarmada.mission)
ty the help :D


------------------------------------------------------------------------------------------------------------------------------------------
Piarmada.mission

Code: Select all

<mission>
	<settings>
		<origin  planet="earth" x="0000" y="100" z="000.0"/>
	</settings>

	<variables>
		<var name="credits" value="13500"/>
		<var name="defaultplayer" value="blue"/>
		<var name="mission_name" value="Piarmada Main Menu" />
		<var name="difficulty" value=".25"/><!--good starting difficulty here-->
		<var name="system" value="Special/Empty" />
		<var name="description" value="Welcome to Vega Strike: Upon the Cold Sea." />
		<var name="savegame" value="piarmada_menu" />
	</variables>
	
    <flightgroups>
		<!-- need at least one, to avoid messing with the engine -->
                <flightgroup name="Shlimazel" faction="privateer" type="dumbfire" ainame="default" waves="1" nr_ships="1">
			<pos x="119990000000" y="-9000000" z="-109990000000.0"/>
		</flightgroup>
    </flightgroups>
	
	<python>
import Base
import Director
Base.LoadBaseInterface("piarmada_menu")
from privateer import privateer

my_obj=privateer(8000,40000,500,3,2,.6,.25,.1,400000,2000)

	</python>

</mission>
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Re: vegastrike -m mod does not work

Post by legine »

hmm I checked again. actually nothing is found in my mod folder exept vegastrike.conf.

To be sure I have

Vega Strike\piarmada-1.0_win_ver\mods\piarmada
under that I got the folders bases, modules, mission

and I do call vegastrike with the line:
vegastrike -mpiarmada piarmada.mission

Thats all right so far?

If i put everything in the normal folders it works all nice. :?

The log files are not very much helpfull because they realy print no hints.

only maybe
['G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\bin\\python25.zip', '.\\DLLs', '.\\lib', '.\\lib\\plat-win', '.\\lib\\lib-tk', 'G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\bin']
['G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\modules\\builtin', 'G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\modules', 'G:\\workspace\\Vega Strike\\piarmada-1.0_win_ver\\bases']
but thats just a shot in the blue :(
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Re: vegastrike -m mod does not work

Post by ace123 »

Any success with this?

I saw here that it is looking in piarmada:
C:\Dokumente und Einstellungen\cthcon24\Desktop\Vega Strike\piarmada-1.0_win_ver/mods/piarmada/

So if mission file should be here, it should find it:
C:\Dokumente und Einstellungen\cthcon24\Desktop\Vega Strike\piarmada-1.0_win_ver/mods/piarmada/mission/piarmada.mission

I wouldn't worry about it too much right now--when it comes to packaging I can try to fiddle with the messy vsfilesystem code to get it working right. (The code is pretty ugly and has a lot of special cases so I may have missed some of those.)
Post Reply