modding the starting system

Forum For Privateer Remake

modding the starting system

Postby esgaroth » Tue Nov 06, 2007 9:42 am

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 ?
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Postby Neskiairti » Tue Nov 06, 2007 11:39 am

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.
Neskiairti
Confed Special Operative
Confed Special Operative
 
Posts: 334
Topics: 11
Joined: Wed Jan 10, 2007 9:10 pm

Postby esgaroth » Tue Nov 06, 2007 1:29 pm

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...
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Dilloh » Tue Nov 06, 2007 2:13 pm

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.
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby ace123 » Tue Nov 06, 2007 8:36 pm

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.
ace123
Lead Network Developer
Lead Network Developer
 
Posts: 2560
Topics: 32
Joined: Sun Jan 12, 2003 2:13 am
Location: Palo Alto CA

Postby Dilloh » Wed Nov 07, 2007 2:59 am

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?
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby esgaroth » Wed Nov 07, 2007 3:29 am

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....
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Dilloh » Wed Nov 07, 2007 1:49 pm

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.
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby esgaroth » Wed Nov 07, 2007 2:38 pm

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....
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Neskiairti » Wed Nov 07, 2007 3:35 pm

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?
Neskiairti
Confed Special Operative
Confed Special Operative
 
Posts: 334
Topics: 11
Joined: Wed Jan 10, 2007 9:10 pm

Postby esgaroth » Wed Nov 07, 2007 10:26 pm

well... if noone knows any different way thats what i`ll do.
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby esgaroth » Wed Nov 07, 2007 10:47 pm

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 ?
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby esgaroth » Thu Nov 08, 2007 2:37 am

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....
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Dilloh » Thu Nov 08, 2007 2:54 am

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.
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby esgaroth » Thu Nov 08, 2007 5:37 am

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....
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Dilloh » Thu Nov 08, 2007 12:39 pm

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.
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby esgaroth » Thu Nov 08, 2007 1:25 pm

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 !
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Dilloh » Fri Nov 09, 2007 7:33 am

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:
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby esgaroth » Fri Nov 09, 2007 12:21 pm

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....
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Dilloh » Fri Nov 09, 2007 2:37 pm

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.
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby esgaroth » Thu Nov 15, 2007 8:28 am

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....
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Dilloh » Fri Nov 16, 2007 11:59 am

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.
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby esgaroth » Sat Nov 17, 2007 7:20 am

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...
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany

Postby Dilloh » Sun Nov 18, 2007 6:13 am

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...
User avatar
Dilloh
Elite Hunter
Elite Hunter
 
Posts: 1149
Topics: 25
Joined: Mon Aug 14, 2006 8:56 am
Location: Black Forest, Germany

Postby esgaroth » Sun Nov 18, 2007 9:31 am

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.
esgaroth
Confed Special Operative
Confed Special Operative
 
Posts: 317
Topics: 34
Joined: Mon Jan 19, 2004 5:48 am
Location: Konstanz, Germany


Next

Return to Privateer Remake

Who is online

Users browsing this forum: No registered users and 1 guest

cron