Jump to content
Game-Labs Forum

More Mucking about waiting for 1.4 - swapping countries


kjg000

Recommended Posts

Hi All, haven't played for quite a while as I'm waiting for 1.4 before I re-evaluate the game. So no comment on the current state.

However, I did get curious with a bit of "modding for simpletons" (i.e. me).

I've just swapped China and the Ottomans

quite simple really,

    start a new campaign (for simplicity, but you may be able to use an existing campaign)

    save and close to the main menu

    open file converter and convert your chosen save to a .json file.

    (back up the .json file first is wise)

    open in a text editor (like many I use Notepad++)

    Select your chosen swap victims (I have chosen the ottoman and china, MWAHAHAHAAAA)

    search for "ControllerPlayer":"ottoman" and replace all with "ControllerPlayer":"ottomanXXX"  (ottomanXXX is just a placeholder)

    search for "ControllerPlayer":"china" and replace all with "ControllerPlayer":"ottoman"

    search for "ControllerPlayer":"ottomanXXX" and replace all with "ControllerPlayer":"china"

    do the same with "Controller":" PLAYER"  where PLAYER = your chosen victims as above

    and also with "ClaimPlayer":"PLAYER" if desired (I THINK  countries cannot surrender regions where they are the claim player)

    Save and convert back to .bin

A bit of confusion while they sort out their fleets but presto switcho the chinese are now in the mediterainian and the ottomans are in South Asia.

Not as good as making the Ottomans a playable faction but something to mix things up a bit.

 

BTW be carefull, every comma etc has a meaning and adding or loosing any character can cause the file to fail.

CAVEAT; i'm still on turn one and i didn't swap the claimplayer so I'm interested to see how this plays out and if it is really workable.

 

Almost forgot - DON'T complain to the DEV's about files you have modded and use at your own risk ;-}

 

Observation 1: It looks like if you don't set the "ClaimPlayer":"PLAYER   variable, then an active player (in this case China) will actively try to reclaim their territory. The minor player (Ottomans) do not.) Also you may consider adjusting the "wealth": ,"wealthGrowth": and ,"wealthGrowthMul": variables for each of the affected countries.

 

OK, I've played about 15 years from 1890. The swap seems to work fine, however I'd deffinately swap the "ClaimPlayer":"PLAYER  variable as the Ottomans quickly fell to revolutions in the Chinese claim provinces. The chinese never had this problem, presumably as they are a major faction. The Ottomans have survived in the non-claim provinces they inherited without any revolutions. Other than that it made an interesting change in the game.

When I get time I think I'll try changing two major factions next, say USA and Spain?

Edited by kjg000
dev imdemnity, observations, conclusions
  • Like 1
Link to comment
Share on other sites

18 hours ago, Panzergraf said:

One tip: Using a .json editor like for example https://jsoneditoronline.org/ makes things easier than doing it in notepad.

Sorry, one of us is not making themselves clear, probably me.

I don't use Notepad the microsoft app included with windows, I use Notepad++, "a free and open-source text and source code editor for use with Microsoft Windows. It supports tabbed editing, which allows working with multiple open files in a single window. The product's name comes from the C postfix increment operator; it is sometimes referred to as npp or NPP" (wikipedia). It supports a plethora of languages including JSON, XML, HTML, Java, C, C++ and many, many more.

Link to comment
Share on other sites

On 8/21/2023 at 8:42 AM, stephenogriffin said:

Just a simple question, what file converter do you use?

 

Apologies! even though your post was time-stamped 2 hours earlier than my last login, it was not visible. I assume your account was awaiting approval.

 

If by file converter you mean from the .bin format to the .json format and back, there is an app available on the games main menu. Look a the top right of the screen, to the left of the book like Help icon you will see what looks like a compass rose, thats it. Given its crypitic nature it is not suprising that many players miss it (or should that be most?).

WARNING when converting from the .json format to the .bin format your .json file will be deleted, another eccentric choice by Games Labs. I reccomend making a copy of the .json file before and after making any edits so that you have a copy of both the original and a copy of your edits to fall back on. Also your edited .json file needs to be named save_0.bin to save_4.bin otherwise it will not be available to be loaded. If you named it save_0_trial_1.json for example you would end up with a file named save_0_trial_1.bin which would not appear in the "Continue Campaign" menu and so could not be tested. Another eccentric choice by Games Labs (wait, have I already said that? Its a well worn phrase!).

Also, if the .json file won't convert it probably has an error in it. Check for incorrect syntax such as missing punctuation etc. The system will NOT give you any sort of error message other than refusing to convert the file. Have I mentioned Games Labs eccentric choices?

For the purposes of this thread you do not need to format the single line presented after the conversion to a nicer human-friendly format (what was that about GL choices?). However if you want to do so, for error checking for example, search and replace all },{ with },\n{ (note direction of the backslash). This will give you a more friendly format to work with. No need to convert back once you are ready to save, the game will read the file despite the extra formatting. Should you ever get into resources.assets editing with something like UABE however, this will NOT be the case.

Edited by kjg000
other left fool!: Also...
Link to comment
Share on other sites

OK, so I've tried swapping the Brits and the Ottomans and the Brits and AH, Both times editing all three variables, "ControllerPlayer", "Controller" and "ClaimPlayer" (where "ClaimPlayer" was the relevant player - not every province controlled is also claimed). So far no problems having played 10 to 20 turns each time.

As mentioned in the original post this adds an interesting dimention of mixing things up and even allowing players to try out their favourite nations in varying locations. Ofcourse there is no reason to just swap two nations. Why not try swapping all of them (copy nation A to placeholder, Nation A to B, B to C ... I to H, H to Placeholder, even throw in a couple of neutrals if you like).

Warning with neutrals, check to make sure whatever neutral you are swapping with has sufficient port capacity to build a worthwhile fleet, otherwise they will not be playable or be a challange to play against. You could take over the ports from several neutrals to make a playable faction though (untested).

Link to comment
Share on other sites

Just noticed a potential hitch, hopefully a one off. On restarting a campaign in which I have swapped AH and UK I am back in Jan 1890! not sure why but the game doesn't seemed to have made any updates to the savegame (save_0.bin) even though I habitually hit save before exiting and no errors were reported. Not sure if this is a problem with the vanilla game or with the (savegame) modded version as i haven't played for a while and this is the first time since coming back that I have tried to resume a campaign. I had noticed one other person mentioning something like this on steam but it doesn't seem to be widely reported.

Link to comment
Share on other sites

  • kjg000 changed the title to More Mucking about waiting for 1.4 - swapping countries

Bored now....

OK, so a quick tip on modding the resource.assets file ;-}

You can collect all of your NEW ENTRY mods at the end (or start) of the file before the ##,,END,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"  line.

So for a hull entry,
##,,hull,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

bb_4_britain_MINE,,hull,N3/G3 MINE,,-1,-1,0.01,900,bismarck_hull_a,1.3,,,"britain, usa","type(bb), BB_British_N3, bb, g4, Small_Deck, Narrow_Deck, Nelson, Middle_Towers_Chance, var(nelson)","hsize(3000), hull_form(99), stability(99), floatability(99), endurance(99), spot(0), turn(42), vis(7900), beam(0), draught(0)",,,,0.155,1,3,38000,65000,19,,,,,,,30,3,6,,30,,

will create a  hull with new specs and using the german bismark Super Battleship hull scaled to be slightly smaller(1.4 -> 1.3).  Changes in bold, just for demonstration purposes.
##,,hull,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, is required to ensure the relevant table is open. Remember to unlock the hull in the technologies file other wise it will not be visible (see below). The first entry must be unique (bb_4_britain_MINE). The hull is called N3/G3 MINE (does not need to be unique), can be used by britain and the usa, max weight is 65000 tons, it is limited to 19" guns and can do 30 knots before extra penalties. Note this hull will appear at the end of the shipyard hulls menu (after DD, TB) for britain and the usa and will use the structures for the british hull, which are defined in the param section shown in italics. It will use the selected countries guns, in this cas britian or usa.

Entries are listed in the order they are loaded into the table so if you want this to be elsewhere on the list either:

  • enter your changes at the start of the file, before the first ## entry (keeps all of your changes in one place) or
  • place your entry in the relevent section where you want it to appear in the menu. (just your entry, no ## line and this means you will have to hunt for your entry if you want to edit it).

(original specs for the N3/G3 hull are

bb_4_britain,,hull,N3/G3 class,,-1,-1,0.01,900,dreadnought_hull_flat_b,1.49,,,britain,"type(bb), BB_British_N3, bb, g4, Small_Deck, Narrow_Deck, Nelson, Middle_Towers_Chance, var(nelson)","hsize(2000), hull_form(93), stability(85), floatability(80), endurance(70), spot(0), turn(42), vis(7900), beam(0), draught(0)",,,,0.155,1,3,38000,61000,18,,,,,,,22,3,6,,21.5,,

)

To unlock in the  technologies file
# $techType_name_hull_strength,hull_strength,,,,,,,,,,,,

hull_strength_2,hull_strength,,$technology_name_hull_strength_2,1891,,42,"hull(2.5), stat(hull_form;2.5), stat(endurance;2.5), unlock(b1_brennus;b_1_russia;bb_4_britain_MINE)",,,$technology_desc_hull_strength_2,"Materials with better strength-to-weight ratio can produce bigger hulls. *Hull weight -2.5%, Hull Form +2.5%, Endurance +2.5%*",,

will unlock this hull when hull_strength_2 is researched. Again, remember this is just to show what is possible, nor what is recommended.

Remember, backup backup backup, remove all extraneous formatting you might have introduced to make the file readable (including whitespace) and above all ... enjoy.

Edited by kjg000
bumped the enter key at the wrong time.
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...