I decided to play Vegastrike 0.5.1 anyway to see if I liked it
Not sure if this is the right place to ask this, does anybody know how to make space 'busier' - i.e. more ships around. I don't mean adding Units, I just mean, is it possible to add traffic. Space seems a little empty at times.
good question !
It's possible , but i'm not sure there is a simple way to make it ( like tweak the vegastrike.config ) .
But that kind of stuff is driven by the python scripts , located in Data/Modules .
The number of flightgroups can also be tweaked in the missions files .
So ... yeah , it is possible AND a thing i will have to deal with too in my VSEvolved project
EDIt :
If you are familiar with python coding , just look for exemple in generate_dyn_universe.py, with for example that sample of code :
Code: Select all
vdef GenerateCivilianFgShips (faction,factionnr,docapships):
lst=[]
capitals=faction_ships.capitals[factionnr]
fighters=faction_ships.fighters[factionnr]
numfighters=1
try:
numfighters=faction_ships.fightersPerFG["default"]
numfighters=faction_ships.fightersPerFG[faction]
except:
pass
numcapitals=0
if docapships:
try:
numcapitals=faction_ships.fightersPerFG["default"]
numcapitals=faction_ships.PerFG[faction]
except:
pass
fighters_per=len(fighters)
ht={}
for i in fighters:
numtogen=floatToRand(numfighters/float(len(fighters)))
if numtogen:
if i in ht:
ht[i]+=numtogen
else:
ht[i]=numtogen
for i in capitals:
numtogen=floatToRand(numcapitals/float(len(capitals)))
if numtogen>0:
if i in ht:
ht[i]+=numtogen
else:
ht[i]=numtogen
for hv in ht:
lst.append([hv,ht[hv]])
return lst
Edit2 : I think i've located the critical zone of code to tweak the population in the universe , in the same python module :
Code: Select all
def AddSysDict (cursys):
global _generatedsys, _last_progress_percent
#pick random fighter from insysenemies with .3 probability OR pick one from the friendlies list.
# debug.debug('Addsysdict')
sysfaction=VS.GetGalaxyFaction(cursys)
numflightgroups = 1+vsrandom.randrange(fg_util.MinNumFlightgroupsInSystem(cursys)-1,fg_util.MaxNumFlightgroupsInSystem(cursys))
#debug.debug("Initializing system %s with %d flightgroups... " % (cursys,numflightgroups))
progress_percent = (float(_generatedsys) / getSystemCount())
if progress_percent - _last_progress_percent > 0.01:
ShowProgress.setProgressBar("loading",progress_percent)
ShowProgress.setProgressMessage("loading","Generating dynamic universe (%.2f%%)" % (100*progress_percent))
_last_progress_percent = progress_percent
_generatedsys += 1
global fgnames, fglists
i=0
AddBasesToSystem(sysfaction, cursys)
adjsystems=getAdjacentSystemList(cursys)
for i in xrange(len(faction_ships.factions)):
thisfac=faction_ships.factions[i]
thisfactionnr=faction_ships.factionToInt(thisfac)
rel=VS.GetRelation(sysfaction,thisfac)
iscit=VS.isCitizen(thisfac)
if iscit and thisfac.find(sysfaction)!=-1:
#debug.debug("generating spc civilian for "+cursys+" faction "+thisfac)
#do somethign special for this military faction
if thisfac==sysfaction:
pass
elif iscit:
for neighbor in adjsystems:
if (VS.GetRelation(thisfac,VS.GetGalaxyFaction(neighbor))>-.05):
#fgname=cursys+"->"+neighbor
fgname="(CivReg) "+GetNewFGName(thisfac)
typenumbertuple=GenerateCivilianFgShips(thisfac,thisfactionnr,True)
fg_util.AddShipsToFG (fgname,thisfac,typenumbertuple,cursys)
fgname="Insystem_"+cursys;
typenumbertuple=GenerateCivilianFgShips(thisfac,thisfactionnr,False)
if iscit:
#debug.debug("generating gen civilian for "+cursys+" faction "+thisfac)
if VS.GetRelation(thisfac,sysfaction)>-.05:#brave citizens of the new order...
fgname=GetNewFGName(thisfac)
typenumbertuple=GenerateCivilianFgShips(thisfac,thisfactionnr,True)
fg_util.AddShipsToFG (fgname,thisfac,typenumbertuple,cursys)
friendlychance=.7
if cursys in faction_ships.fortress_systems:
friendlychance=faction_ships.fortress_systems[cursys]
#debug.debug('enemy chance for '+cursys +'= '+str(friendlychance))
for i in xrange (numflightgroups): #number of fgs in a system.
faction=sysfaction
friendly=0
if not sysfaction or sysfaction=='unknown' or vsrandom.random()>friendlychance:
faction=faction_ships.get_rabble_of_no_citizen(sysfaction)#why even have citizens on the list then
else:
faction=faction_ships.get_friend_of_no_citizen(sysfaction)#likewise--- maybe this should be a faction_ships fix
if (faction==sysfaction):
friendly=1
if (sysfaction in faction_ships.production_centers):
if (cursys in faction_ships.production_centers[sysfaction]):
friendly=2
#if (friendly):
# debug.debug(faction+" "+sysfaction+" "+cursys)
factionnr=faction_ships.factionToInt(faction)
global maxshipsinfg
typenumbertuple=GenerateFgShips(vsrandom.randrange(maxshipsinfg)+1,factionnr,friendly)
fgname=GetNewFGName(faction)
fg_util.AddShipsToFG (fgname,faction,typenumbertuple,cursys)
return i
In the above code , have you seen :
for i in xrange (numflightgroups): #number of fgs in a system.
Also in faction_ships.py you could tweak the number of flight groups by systems :
max_flightgroups={"Gemini/Troy":25,"Gemini/Penders_Star":15,"Gemini/Junction":12,"Crucible/Cephid_17":22}
min_flightgroups={"Gemini/Troy":22,"Gemini/Penders_Star":10,"Gemini/Junction":4,"Crucible/Cephid_17":22}
And sure there are many many other ways to achieve a better traffic .
( just check the random_encounters.py file
)
My goal is to create a global traffic driven by a new AI , no more mission scripted only ...