Need help modding campaign

I’m trying to make a simple mod to adjust resource levels/auto harvesting in the HW1 campaign. How would I go about doing this? I can’t find what files to edit in the steamapps/common/Homeworld folder.

Any help would be appreciated.

Thanks,

You’ll find some .big files inside the Data folder that contain everything that can be modded. This tutorial should guide you through making a simple mod. Note that the info about the BigDecrypter & decrypting big files shouldn’t be needed for v2.0+.

You’ll want to extract files from the big files that have “HW1” in the filename as well (you might as well just extract all of them).

Note that any files you don’t include in your mod (when running the game/mod) will be loaded from the .big files, but files you include/edit will override those.

Given the balance implications - I wouldn’t change the cost of anything…

But in terms of RU payout - look at the maps, and even the resource objects…

Are the maps in HW1Campaign.big?

If you want to edit the singleplayer maps, they should be in there, yes.

Ok, I’ve edited the RUs on the first 5 missions and I’ve played up to the 3rd mission. It feels good so far, however the enemy scaling is off. There were only 2 assault frigates on the third mission. There should be at least 4. Is there anyway to adjust this?

Is “referencefleet.txt” in each of the level folders what’s used for enemy scaling?

That’s likely an issue with your fleet composition when you ended m02 and started m03. More combat ships in your fleet means more combat ships in enemy fleet.

Of course, I have no idea what your fleet consisted of, but that’s typically been the trend.

I’m editing the campaign to have a more reasonable number of RUs, but this means my fleet is a bit smaller. I want to adjust it so that the enemy fleet is normal sized even if the player fleet is a bit smaller.

Check this out

http://forums.relicnews.com/showthread.php?27763-addReactiveFleetSlot&p=423014&viewfull=1#post423014

@thisquietreverie - The fleet scaling logic also has a scalar for RUs, right? I wasn’t ever involved in any of that, so I can’t say for sure…

RUs in asteroids? Or RUs in the bank?

It’s extremely complicated and there is no magic “solution” because if you poke at only one part of it the rest of the system reacts to it, pun intended. Just changing the build cost of a ship influences the reactive system of single player and the decision making process of the AI in multiplayer.

As far as I remember (and I’m pretty sure I’m correct), the system has no concept of RUs in placed asteroids. It does know:

How many RUs it took to “build” the enemy fleet
How many RUs it took to build the player’s fleet
How many RUs the player has in the bank (I think this is new to HWRM)

If you strip away all of the other calculations (of which there are a lot, again, complicated) and oversimplify it, the factors I listed influence a ratio that is essentially a decision gate:

<1 = spawn a reactive/set of reactive asteroids with enough RUs that, if harvested, would allow the player’s fleet score to equal the reference fleet score (player’s fleet is weaker than the game expects)

1 or above = spawn reactive ships from the reactive ship list and (maybe, I’ll have to eyeball the lua again) grant money to the enemy to build against the player (might be a HW2 campaign only thing). (player’s fleet is stronger than the game expects)

How Relic did it was they had QA testers blast through the game, compiling a big database of all their persist files (I know this because I have all the files somewhere for both games). They then annotated the files with which tester was good at the game and ranked them. The best ones became “hard” and the worst ones became “easy” and they aggregated between the two divisions to arrive at the baseline.

We have considerably better tools though in that we can actually inspect the reactive system, something their programmers never thought of or their designers never asked for, inexplicably. It’s theoretically possible to make an excel spreadsheet that does the heavy lifting for the calculations. It’s also fairly easy to track resources in HW1 levels (HW2 levels have lots more asteroids and multiplayer is a nightmare. If you’ve ever wondered why a multiplayer levels asteroid has a cracked out looking number like 314.3412 it’s because I spent hours and hours making every different RU value unique and pattern-matchable so they could be mass scaled without collision).

Even figuring out where to watch for reactive RU asteroids is easy, there are a lot less than you’d think across both games:

Search Criteria

File name:                                                                                                             
Containing text:  addReactiveFleetResourceSlot                                                                         
Look in:          C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\  


Search Statistics

Found:     9 items (1.30 MB)      
Text:      364 hits               
Searched:  1,375 items (1.12 GB)  
Checked:   1,546 items (1.12 GB)  
Status:    Running (01:11 secs)   


Name            Location                                                                                                                                          Modified              Size   Type       Hits 
                                                                                                                                                                                                               
Mission05.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission05\ 7/8/2015 7:18:17 PM   272 KB LEVEL File 34   
Mission06.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission06\ 7/8/2015 7:18:17 PM   74 KB  LEVEL File 20   
Mission09.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission09\ 7/8/2015 7:18:18 PM   175 KB LEVEL File 10   
Mission10.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission10\ 2/18/2016 12:39:05 AM 215 KB LEVEL File 55   
Mission11.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission11\ 7/8/2015 7:18:18 PM   12 KB  LEVEL File 54   
Mission12.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission12\ 7/8/2015 7:18:18 PM   102 KB LEVEL File 29   
Mission13.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission13\ 7/8/2015 7:18:18 PM   251 KB LEVEL File 24   
Mission14.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission14\ 3/30/2016 11:39:43 AM 160 KB LEVEL File 20   
Mission15.level C:\REDACTED\main\Homeworld2\Art\DataHW1Campaign\LevelData\Campaign\HomeworldClassic\Mission15\ 7/8/2015 7:18:18 PM   78 KB  LEVEL File 118  



Look in:          C:\REDACTED\main\Homeworld2\Art\DataHW2Campaign\  


Search Statistics

Found:     3 items (577.60 KB)    
Text:      10 hits                
Searched:  204 items (404.95 MB)  
Checked:   1,997 items (1.09 GB)  
Status:    Running (20 secs)      


Name                   Location                                                                                                                                          Modified              Size   Type       Hits 
                                                                                                                                                                                                                      
M02_Hiigara.level      C:\REDACTED\main\Homeworld2\Art\DataHW2Campaign\LevelData\Campaign\Ascension\M02_Hiigara\      7/8/2015 7:18:18 PM   231 KB LEVEL File 3    
M05_Gehenna.level      C:\REDACTED\main\Homeworld2\Art\DataHW2Campaign\LevelData\Campaign\Ascension\M05_Gehenna\      2/23/2016 12:31:13 AM 308 KB LEVEL File 3    
M13_Balcora_Gate.level C:\REDACTED\main\Homeworld2\Art\DataHW2Campaign\LevelData\Campaign\Ascension\M13_Balcora_Gate\ 7/8/2015 7:18:20 PM   41 KB  LEVEL File 4    


Report generated by Agent Ransack on 6/16/2016 1:35:56 AM

The real work is arriving at what the reference fleet should be in a game where just about everything can be stolen or retired for RUs and where unit caps aren’t enforced. That’s the rub and it has to start at the first level and be built upon because changing something cascades in every subsequent level.

4 Likes

I wonder if, for an upcoming preview, adding a ‘setReactiveScale’ to a level would be useful - it goes in and pre-mults either your cost, or the enemy cost…

And while I’m at it - I bet a mirror to that could be exposed in the player profile - giving us a quick difficulty control.

1 Like

Something that I’d like in my toolbox personally is be able to cap how much reactive fleet can spawn, so you can use the system to have a range of options but not actually scale without limit. That doesn’t seem to be an option under the current system unless you get particularly creative in how you use it.

Also, I am a bit unclear on how the hard and easy reference fleets are used by the engine.

1 Like

Would that mean one could set the scale such that reactive fleets are essentially disabled? I know that lots of people complain about this system.

I’m not sure it is within the confines of the design to ‘disable’ reactive fleets - as-is. Because what you get is a range from min->max. There’s no ‘default’. So you need that math, at some level, to spawn the right stuff.

That said, a few things may be possible (as Cole said, oversimplified)…

  • A per-level global ‘value’ scale (scale value of user’s fleet) - handy for just tuning easy/hard.
  • A per-level global ‘value’ offset.
  • A per-level user-pref scale - meaning the user’s ‘difficulty scale’ can be tuned up/down/off for a given level.

Used in concert levels would be tune-able and optionally ‘non reactive’.

However, no promises - it is at this point just some stray thought…

Hmm. So it might be possible to implement difficulty levels? I’ll continue experimenting with the RU counts in the campaign. The enemy fleets might not be able to scale right but getting the player fleet/RU count to be right would be a good start.

Last I looked, it doesn’t.

So if I make the referencefleet smaller will that make the enemy scale up and vice versa? Would the game run if I deleted referencefleet?

Did HW1 make use of reactive fleets? I thought it did, but don’t remember clearly.