Page 1 of 2

modding the starting system

Posted: Tue Nov 06, 2007 4:42 pm
by esgaroth
i am just modding around a bit with priv remake as a basis for our vegatrek mod. now my question: how can i change the starting system and the starting ship ? in priv remake, all games start in gemini/troy with a tarsus.begin. Where can i change this ?

Posted: Tue Nov 06, 2007 6:39 pm
by Neskiairti
simple way.. change the initial save game. phyiscally move your player to the correct system.. and change the ship hes equipped with.. then you can easily mod the amount of money he has and so forth..
im sure there are other ways.. but yeah.

Posted: Tue Nov 06, 2007 8:29 pm
by esgaroth
yepp....this way i know. But for a release this is not really nice. There must be a way-somehow the priv remake guys changed those data from the original vegastrike to priv remake so someone should know...

Posted: Tue Nov 06, 2007 9:13 pm
by Dilloh
Simply browse /Sectors/Gemini files. Assuming you want the game to start at Perry Naval Base, check the coordinates using Notepad:
Perry.system file wrote:<unit name= "Perry_Naval_Base" file="perry" faction="confed" x="14000" y="17500"/>
After you wrote down the coordinates, paste them into /privateer.100/save/New_Game using Wordpad. Change this line
New_Game for PR1.2 wrote:Gemini/Troy^2900.000000^tarsus.begin 17972.762846 516.810020 517.512846
to
New_Game for VegaTrek wrote:Gemini/Perry^2900.000000^tarsus.begin 14000 17500 0
to (hopefully) pop up at Perry Naval Base. Like this, you shouldn't have any pre-spawned flight groups or map information.

There is a possibility that the value "stardate" could influence the position of the planet/station you're willing to start the game (like e.g. a planet moving throught its orbit); I do not know anything about this value, so if the game is still starting in open space you could ask one of the devs or browse the wiki to find out what the stardate needs to be set to to place all objects to zero.

Posted: Wed Nov 07, 2007 3:36 am
by ace123
Just a word of warning:
Do not use exactly those coordinates. Add some number like 1000 or 5000 (I might be off by an order of magnitude here) to them so you don't end up exactly in the middle of the object which would be bad.

Posted: Wed Nov 07, 2007 9:59 am
by Dilloh
Thanks ace - I already noticed that Achilles' coordinates don't match those in the savegame. So a question: How can I "tell" the savegame that the player should be docked at the object reflected in the coordinates?

Posted: Wed Nov 07, 2007 10:29 am
by esgaroth
in a new install, there is no new_game file, this is created at the very beginning.
and when i delete the New_game file , and i start a new game, then a new new_game savefile is added with the usual starting coordinates and the starting ship.... so the initial values must be located somewhere else....

Posted: Wed Nov 07, 2007 8:49 pm
by Dilloh
I'm not sure if this is correct, though it visually appears to be. I have a backup of a fresh PR1.2 installation in another folder, and the New_Game file exists in its respective directory.

It is possible that the game calls the whole list the very first time you make use of the savegame mask, this'd explain why you don't see it when you first enter the list. After browsing the files I cannot imagine where the game could collect the information from if not from there.

Posted: Wed Nov 07, 2007 9:38 pm
by esgaroth
nevertheless-we have a different map, different systems and different sectors. When i use our universe file and start with the usual new_game file, then i have no flight groups or bases in our systems because the new_game file was created with the old universe file. (Editing this by hand is a lot of work, even more when i dont know what most of the stuff in this file says....). when i then delete the new_game file, and start anew, then a new new_game file is created-with a mini universe consisting only of the gemini/troy system..... our systems and sectors in the new universe file are ignored (probably because we dont have a gemini/troy in our universe. Somewhere this shitty start point must be coded and the easiest thing would be to simply change this....

Posted: Wed Nov 07, 2007 10:35 pm
by Neskiairti
well.. could always temporarily add a gemini/troy to your game.. then do previous method of actually travelling... to where you want to start.. saving.. then removing gemini/troy?

Posted: Thu Nov 08, 2007 5:26 am
by esgaroth
well... if noone knows any different way thats what i`ll do.

Posted: Thu Nov 08, 2007 5:47 am
by esgaroth
just did it.... and it worked.... at least for the creation of a new_game file that looks more or less ok.
However, when i start this way i get my well known "there are no rooms in basefile" error. I guess the relevant parts of the stderr are the following:
dot -0.000445Traceback (most recent call last):
File "mining_basesunsetklingon.py", line 11, in ?
File "C:\Program Files\Vegastrike\arbeitskopie von Privateer/modules/dynamic_mission.py", line 719, in CreateMissions
contractMissionsFor(basefac,baseship,minsys,maxsys)
File "C:\Program Files\Vegastrike\arbeitskopie von Privateer/modules/dynamic_mission.py", line 559, in contractMissionsFor
for kk in faction_ships.enemies[faction_ships.factiondict[thisfaction]]:
KeyError: Federation
dot -0.000445ERROR: there are no rooms in basefile "mining_basesunset.py" ...
xyzwAsking to undock

neutral_nav/default/nav.png, not found
xyzw
neutral_nav/default/generic.png, not found
xyzwdot 0.030317Traceback (most recent call last):
File "mining_basesunsetklingon.py", line 11, in ?
File "C:\Program Files\Vegastrike\arbeitskopie von Privateer/modules/dynamic_mission.py", line 719, in CreateMissions
contractMissionsFor(basefac,baseship,minsys,maxsys)
File "C:\Program Files\Vegastrike\arbeitskopie von Privateer/modules/dynamic_mission.py", line 559, in contractMissionsFor
for kk in faction_ships.enemies[faction_ships.factiondict[thisfaction]]:
KeyError: Federation
dot 0.030317ERROR: there are no rooms in basefile "mining_basesunset.py" ...
Anyone able to translate this ?

Posted: Thu Nov 08, 2007 9:37 am
by esgaroth
just a remark: i think i found the answer to the initial question. There is a file in the missions folder named explore_universe. If you change the starting system and the starting ship there, then the new new_game file has the appropriate starting point and ship. Obviously, the engine gets its information from there.
However, the above mentioned python problem remains....

Posted: Thu Nov 08, 2007 9:54 am
by Dilloh
stderr.txt wrote:File "mining_basesunsetklingon.py", line 11, in ?
...
dot 0.030317ERROR: there are no rooms in basefile "mining_basesunset.py"
Looks like the game is trying to place your starting ship onto a stock PR mining base - as you tried, so this is okay. However, since you don't have any dynamic missions at the moment I'd temporarily change /bases/mining_base.py and take out the following lines:
mining_base.py wrote:import dynamic_mission
dynamic_mission.CreateMissions()
which seem to cause the crash.

Posted: Thu Nov 08, 2007 12:37 pm
by esgaroth
i am sure that works-thats what i did initially 3 months ago in vegatrek. but then i am as far as i was 3 months ago-with a static universe and no missions. that one we already have. remember-i started modding with priv remake because i want exactly those 2 things (missions and dynamic un iverse...) to work....

Posted: Thu Nov 08, 2007 7:39 pm
by Dilloh
Yes, but stderr refers to this:
KeyError: Federation
It seems that you set a Federation faction/key somewhere which doesn't fit the entries within the python modules.

The game tries to create dyn missions for hunters, merchants, confeds, etc - so it seems you missed to alter something, like i.e. faction_ships.

Posted: Thu Nov 08, 2007 8:25 pm
by esgaroth
thanx ! although i dont know what a key in python is (sometning like a variable?) i may have found the problem. in the universe file the faction is "Federation" and in the faction_ships it is "federation". a first test looks good !

Posted: Fri Nov 09, 2007 2:33 pm
by Dilloh
Yes, the "key" can be considered as some sort of variable. And as you noticed the whole game seems to be character sensitive, so I'd be quite cautious or simply avoid using them.

Glad I finally could be of service at least a little bit :oops:

Posted: Fri Nov 09, 2007 7:21 pm
by esgaroth
Do not underestimate the power of communication ! Even if you cant say "the problem is X, do y and it disappears" talking about a problem often brings the solution closer, even if it is not visible immediately.
But next question (please dont beat me...):
How can I get rid of the storyline ? I guess we dont need it in vegatrek....

Posted: Fri Nov 09, 2007 9:37 pm
by Dilloh
I won't beat you :wink:

Initially, there is no need to get rid of the storyline for the Star Trek universe won't have the two system where the storyline starts, those are
New Detroit in New Detroit
and
Bodensee in Tingerhoff

However, the relevant file is campaigns.py
Deleting the first two lines should do it:

Code: Select all

import campaign_bonus
campaignsloaders=[lambda:LoadMainCampaign(),lambda:LoadRFCampaign(),lambda:LoadRFMurphyCampaign(),lambda:LoadRFGoodinCampaign(),lambda:LoadRFTaylaCampaign(),lambda:LoadRFLynchCampaign(), lambda:campaign_bonus.LoadBonusCampaign()]
You might have noticed the additional table fixers popping up from time to time. Those assumably can be erased by opening /bases/fixers.py and deleting the following block:

Code: Select all

def RandFixer (room,which):
	fixer=mission_lib.CreateRandomMission(which)
	if fixer==():
		return NoFixer()
	return Fixer(fixer[1].split(' ')[-1].lower(),fixer[1],[],fixer[0],"bases/fixers/generic%d.py"%which)
Note that I haven't tested this, so here's my favourite quote especially for esgaroth:
The guys reading the lotto numbers on the german ARD channel wrote:"Alle Angaben ohne Gewähr!"
Anyway, I feel pretty sure this should work.

Posted: Thu Nov 15, 2007 3:28 pm
by esgaroth
Thanx, Ill try it.
Next question (i know I can be annoying...):
I just tried to perform one of the cargo missions and was badly disappointed. I accepted to bring some cargo to planet xyz, launched, flew to said planet, was ambushed by the evil guys, defeated them, and landed. So far everything was ok, but then nothing happened. On the target planet, i could not finish the mission. In the mission screen, i could read that i have to land on exactly this planet to fulfil mission- just nothing happened. Any idea what is wrong ? No error message, just not possible to finish mission. Repeated similar missions some times now-everytime the same.
I would very much appreciate any suggestions....

Posted: Fri Nov 16, 2007 6:59 pm
by Dilloh
Yes, we had that problem while experimenting with the planetary scales from WCU.

I guess VT uses larger scales for planets and bases like privateer had. This is no problem for landing, but might be a problem for completing missions. For completing a cargo mission the game not only requires you to land, but also to come to a certain distance to the base before landing. For example, after entering the final system you see two lines on your objective screen:

Go to Sol => Green means this objective is completed, you're in the Sol system
Deliver cargo to Earth => Brown means you still have to move close enough to Earth.

In PR, this "completion radius" is about 5000km from the planet's center. And it works there, for planets have a radius of about 1200km. Then "Deliver cargo to" line turns green then, and you can dock.

VegaTrek has larger planets, right? You can test my theory by editing a system and making one of the planets smaller. If your cargo mission works then, you got the answer.

However, you're not damned to make tiny planets then. Since VegaStrike also has large planets, there must be a way to change the "objective radius" - I didn't stumble over such a script yet, but maybe ace123 knows.

Posted: Sat Nov 17, 2007 2:20 pm
by esgaroth
You saved my day ! It seems that your guess is right. Most of our planets have real size, and i checked it, if i fly an eternity and come very very close to the planet then i can complete the mission.
Most likely, this distance is somewhere in the vegastrike.config , but i certainly dont know where...

Posted: Sun Nov 18, 2007 1:13 pm
by Dilloh
I've browsed vegastrike.config and didn't find anything - but I've seen you pointed your question to the contributor forum, so let's await the reply - I hope this thing is not hardcoded...

Posted: Sun Nov 18, 2007 4:31 pm
by esgaroth
yes, we may need a broader audience to answer this question.
2 more things :
1. how can i get rid of the intro video ?
and, more important:
2. purchasing a new ship.
In the weapons.lib for example in the part where you can buy a orion i have changed "orion" to "akira", but when i buy it, nothing happens. I can buy the akira (if i have the money), but i still have the ship i started with when i fly away. Any idea what i have to change ? buying a galaxy works, for we also have a galaxy class.... i guess there is another script involved, but i dont know which.