Mission Reward Generator

Anyway, this may seem slightly petty, but for personal preferences I want to modify (read: reduce) the number of credits earned from cargo missions, clean sweeps, and defend missions so that it will play more like the original (right now its too easy to upgrade your ship). I'll have to adjust the high-end values for stuff like capships and other fighters at a later date to match the new mission rewards.

Anyway, I can do this all on my own, except for the life of me I can't find the code for generating it. Presumably I should look in the modules/ section, and I find a whole bunch of references to it (the definitions). I find several lines in different files dealing with number of jumps, probability of enemies, number of waves of enemies, and stuff like "credsmin - credsmax." Like the following, drawn from modules/bounty:

162
def initrandom (minns, maxns, credsmin, credsmax, run_away, minshipdifficulty, maxshipdifficulty,jumps=(),var_to_set=''):

175
return bounty (minns,maxns,(1.0+(sd*0.5))*(vsrandom.random ()*(credsmax-credsmin)+credsmin),run_away,sd,tempfaction,jumps,var_to_set)


The problem is that every single file is importing this determination from somewhere else, and I just can't find it. It's probably stupidity on my part, but oh well.

If anyone could be so kind as to direct me to the code for generating both mission descriptions AND the pay, I can do everything else myself.
 
the file in question is modules/dynamic_mission.py
that determines the descriptions and price of the mission

we would be happy to accept more reasonable mission prices

setting the uncapped difficulty to 1.5 instead of 8 helps... also editing difficulty.py and changing the difficulty cap from .999 to .599 helps as well

but more edits are welcome for 1.01
 
Thanks, I'm working on it now.

My adjustments are ultimately arbitrary (i.e. my idea of what is "balanced" vs. the status quo), so it will take some time to test them and see how they work out. Plus, although I'll submit them to you for consideration in 1.01, I'm not sure it's a good idea to include my mission rate edits by default in the patch. Players who want to be able to rack up money fast in the early game and move beyond the tarsus in a matter of game hours will have to be more...patient...under my modifications. I remember playing Privateer original over several weeks, a little bit at a time...flying through the game (no pun intended...) in a matter of days or a week seems to me to be silly. So really I'm doing this for myself...and anybody who playtests it and likes the new balance is welcome to keep it. But I don't think it will be welcomed by most of the players here. Still...I could provide you with an alternate file that mainly focuses on "middling" rates rather than reducing them significantly overall.

When I'm satisfied with the changes to the file, I'll playtest it myself for a while and would appreciate it if 4-5 people were to do so as well and tell me how they feel with the new mission rates (I'll upload it to my university account).

In the end, I think this is what I will end up doing:

1) Reducing the frequency of non-campaign fixers in the bars + reducing the credit bonus for their missions (Fixers get 100% bonus, Merchant guild missions 50%...I'm planning to drop fixers to 75%).

2) Dropping the upper bound on mission earnings across the board, but especially for Clean Sweep, Defend, and Cargo missions.

3) Middling the number of Cargo missions available through the mission computer (I basically want to prevent situations where you have almost a dozen missions to choose from, as well as instances where there are only three).

4) Pretty much eliminate the possibility of completing a cargo mission without encountering a single enemy (this happened quite a lot for me).

5) Escorts and Patrol missions will be much more attractive categories, since I will not downgrade them as much as I do the others.

6) I'll put a cap on Bounty and Defend missions so there's no 16 starship business...and rates will be adjusted to more closely match the difficulty.

7) Since mission rates will be lowered across the board, trading will become more viable. Still not lucrative enough to be a substitute for missions, but much more comparable than it is right now. At a later date I also want to look into the sector economy..but that'll probably go in WCU, not PrivR.

8) For myself, I intend to fiddle with the prices for the highly expensive upgrades/ships that were not part of Privateer original. My goal is to inflate the time spent in "early game" (Tarsus/non-upgraded secondary ship) and "middle-game" eras (campaign and ship is upgraded with all but the most expensive improvements like autotracking and high reactor/shields). I don't want to make the late-game excruciatingly long or boring (i.e. suppose you want to buy a capship...making 8 million takes long enough as it is...so I'll probably slash that by a couple million).
 
These sound exactly like goals I had wanted to tweak--but I simply do not have the time right now... doing this would put me in the black flyboy ;-) (i.e. I really like your goals)

I also think that this could be ripe for inclusion with 1.01, but I'll talk to the other developers about it.
 
Excellent list!
I'd like to suggest a few more items:
  • Establishing an "easy", central trade route, comprising systems between Troy and New Detroit, but with lowest profitability.
  • Increasing difficulty as the jump-count distance increases away from this easy corridor (but increasing the profitability) by upping the probabilities and/or numbers and/or strength of enemy encounters.
  • Better differentiating the types of enemies encountered in different regions: Kilrathi to the East, pirates to the North, retros to the South; and both: pirates AND retros, to the West.
By doing this we'd have a geography-based difficulty distribution, which would allow peaceful players like me to move slowly but steady by sticking to the easy trade zone, while players who like fighting above all else can venture out and reap higher profits. This would also do away with the need to artificially increase difficulty as the game progresses to keep the player challenged, --i.e.: The player would have control over the amount of challenge he or she wants by simply and intuitively "venturing out" into harsher regions.

Oh, yeah, couple more:
  • Making cargo mission generation take into account the types of planets between end points, in terms of what they produce and consume; --i.e. no more missions to e.g. deliver uranium FROM New Detroit TO Helen...
  • Making fixers and mission goals agree with the faction of the base; --i.e.: no more Confed fixers, or bounty-on-pirate missions, on pirate bases; and so on.
 
dan_w said:
  • Better differentiating the types of enemies encountered in different regions: Kilrathi to the East, pirates to the North, retros to the South; and both: pirates AND retros, to the West.

I think that the system/planet type indicator already deals with that. But you're right, there needs to be a more clearly defined theme and evident trend with respect to ships appearing in an area. I would think (guessing) that the dynamic universe module would address this, or maybe random_encounters (go figure...), so I'm not going to be looking at that for the present.

dan_w said:
  • Making cargo mission generation take into account the types of planets between end points, in terms of what they produce and consume; --i.e. no more missions to e.g. deliver uranium
    FROM New Detroit TO Helen...
  • Making fixers and mission goals agree with the faction of the base; --i.e.: no more Confed fixers, or bounty-on-pirate missions, on pirate bases; and so on.

Good thought. As of right now, the cargo missions are generated by randomly calling a cargo type and quantity. It wouldn't be much of a stretch to constrain the list of possibilities based upon the planet type of origin, and further by the class of the destination planet. So that's doable.

Fixers...fixers are generated by the mission (random number between 0 and 1, if value is <.02 then it's a fixer mission, if <.4 then its a guild mission) not by the base (unlike guilds). And cleansweep missions, for instance, generate confed officers. I guess what we could do is insert an additional IF statement after the random number generator fixer saying that if its a pirate base, don't generate the fixer.

I've also increased the number of cargo units to be transported from 5-25 to 10-30 (rigged to yield 20 units 50% of the time). And I've gone ahead and modified the random cargo briefs to include the number of cargo units to be transported, but its not final because I'm having some problems with display. Basically, what the game does is call a random cargo brief from universe/cargo_brief and then replace certain variables like $CG (cargo type), $DB, and $PY (pay). I've added a new variable $NC in the cargo brief document, and copied + modified the line that replaces the other variables, but for some reason it still keeps coming up as $NC in the game...either I'm pulling the wrong value (I doubt it, 'numcargos' seems appropriate) or there's some extra code somewhere else that needs to be adjusted. Will be a quick fix, and its only modifying 3-4 lines of code so it's something I can release here for anyone who wants to change it.

dan_w said:
  • Establishing an "easy", central trade route, comprising systems between Troy and New Detroit, but with lowest profitability.
  • Increasing difficulty as the jump-count distance increases away from this easy corridor (but increasing the profitability) by upping the probabilities and/or numbers and/or strength of enemy encounters.

Hmm...this is a great idea, but would require 100% new code (there doesn't seem to be any basis for it in the source). That's not a problem, except for the fact that I am by no means a programmer. I can quote the Constitution to you, or tell you what I think about political and economic development eras, but I have trouble writing anything, however small, from scratch. Although I like to think that years of fiddling with games makes me learn quite fast, it's more likely that any code I ended up generating would be clunky. Still, it's a great idea so I'm willing to put my head together with someone else on this at a later date. Earlier I alluded to wanting to look into the sector economy - basically I wanted to link the commodity prices to the random news generator (or maybe create a special "ticker" for members in the merchant guild, and route the economic news stories to that terminal). For example, a system under blockade according to the news report should be paying high prices for stuff like food and equipment. But that's only speculation right now - being a perennial novice at programming means that you work very slowly.

AIM: sadp182
 
Will be a quick fix, and its only modifying 3-4 lines of code so it's something I can release here for anyone who wants to change it.
.......................................................................
But that's only speculation right now - being a perennial novice at programming means that you work very slowly.
I'm a C++ programmer, myself; my problem is figuring out WHAT to change where; --finding where the work for any particular thing is done in the vegastrike engine. I wanted to change the targeting so that it would pick the nearest hostile, but aften spending many hours trying to figure out where the targeting is done, I've almost given up hope. But I'm aching to get involved and help with this project. If you're good at figuring the big picture, maybe we'll make a good team. We seem to be on the same wavelength, vision-wise.

With regards to distributing pirate/retro/kilrathi concentrations geographically, and increasing with distance away from the "easy corridor", although I could write simple linear equations to yield numbers, I would apply such equations manually, and write values down for each system as part of each system's description. In other words, I'd "script" the systems, to use local forum lingo. The reason for this is that no generative algorithm can ever produce needed local variations. There are areas of the map where human and kilrathi-held systems are mixed. There are also such exceptional cases as kilrathi-rebel-held systems (one or two, I believe).
And it would make sense, for instance, that if kilrathi encounter probabilities increase towards the East, up to, say, 50% probabilities at each nav point, that this would suddenly jump to 100% within kilrathi held border systems, as these would be heavily defended; and yet drop again to 50% when deeply inside Kilrah.
 
Haha, I'm a moron.

Admiral DeRuyter said:
I've added a new variable $NC in the cargo brief document, and copied + modified the line that replaces the other variables, but for some reason it still keeps coming up as $NC in the game...either I'm pulling the wrong value (I doubt it, 'numcargos' seems appropriate) or there's some extra code somewhere else that needs to be adjusted. Will be a quick fix, and its only modifying 3-4 lines of code so it's something I can release here for anyone who wants to change it.

The reason it wasn't getting shown was because I had the file I was working on named dynamic_mission_b.py (i.e. the original file was being loaded instead of the modified one). Once I did that, it worked out fine.

So that's done and matched up, simple and easy.

Anyway, I'll finish up the rest of the mission types in the next hour or so...after that all that's left is to test the balance. I'll need volunteers to playtest it. I was also thinking of writing a calculator to simulate n results, making the testing much faster. But I'm not sure if I'm going to do that.

Anyway, once I'm done I would appreciate it if some people volunteered to test it out for me (i.e. do they think the pay rates are too low now, or still too high, or just right?)

Once I'm done with this, I'll take you up on that offer dan. My AIM is sadp182, and I have ICQ, MSN, and Y! accounts as well. All my IM services are buggy these days however, and AIM is the least buggy so I'd prefer that as a method of collaboration.
 
Hi!

I got a mission to destroy some ships for 50k or so. How many khrameks do you see there?

Maybe this should be recalculated too...
 

Attachments

  • 1.jpg
    1.jpg
    32.2 KB · Views: 205
Um...just an update. This little project is not dead, it's just in a state of suspension since I have a lot of schoolwork to do.

Anyway, most everything I wanted to do (much of what's here and some other stuff as well) was completed about a week ago, and that's when I last tested it. I overshot on several things, so there's a good bit of balancing to do.

I expect to finish what I'm busy with in the next few days. Hopefully I'll have a 'patch' ready for testing at the end of the weekend (this is ambitious of me actually...it probably won't happen until the middle of next week).
 
I did some stuff for that in WCU, check in modules (dynamic_battle.py and dynamic_mission.py, also about the debris -- any ship with turrets in an area, once there are no more hostiles, WILL help clean up. Feel free to grab my AI and plug it right in the priv remake)
 
Admiral DeRuyter said:
7) Since mission rates will be lowered across the board, trading will become more viable. Still not lucrative enough to be a substitute for missions, but much more comparable than it is right now. At a later date I also want to look into the sector economy..but that'll probably go in WCU, not PrivR.

And I've gone ahead and modified the random cargo briefs to include the number of cargo units to be transported,

As a EV gamer, I highly aprove of these.

Bad enough that in EV you get paid to do missions for 10,000 when the run would only earn you maybe 4,000 at most, but the way privateer remake pays you up to 20,000 for cargo mission for carriying as little as 5 tons, while you can make maybe 1000 credits off of trading in that fashion....

Is just blimey riddiculous.

And not knowing how much cargo space a mission need has lead to me auto failing missions, which is very annoying. (and whats up with your minifest saying maybe 12 tons of passengers, but them taking up 50 tons in your hold?)
 
Back
Top