User avatar
Kensai
Posts: 2712
Joined: Mon Sep 19, 2011 4:54 pm
Location: Freiburg, Germany

Giving some ship building capabilities to nations that don't have

Fri Apr 06, 2012 9:51 am

In our epic 16-gamer multiplayer we have some nations that by design can't build ships. These human-played nations are: Mexico, Persia, China. We would like to give them some minor shipbuilding capabilities (a small force pool) to build their own commercial fleets and some entry-level military ships.

Which is the most painless way to do this? You don't need to script it for me, just tell me where to look and the commands I should use.

tyia
Care to unify Germany as Austria? Recreate the Holy Roman Empire of the 20th Century:
Großdeutschland Mod
Are you tough enough to impersonate the Shogun and defy the Westerners? Prove it:
Shogun Defiance Mod (completed AAR)

sagji
Lieutenant
Posts: 148
Joined: Sat Apr 03, 2010 6:33 pm

Mon Apr 16, 2012 1:52 pm

First you need to create the units.
This involves adding new unit files to the units directory, deleting the existing unit cache, and adding new unique entries to the unit alias file. The new units files will need to refer to existing models, or you will have to add new models in the same way.
Using existing models causes problems - mainly on how replacements are handled. All Merchants ships currently use CMN models - which is probably why you can't build replacements until you build a transport.

This will work for ships that are subsequently added to the force pool.

However ships that have previously been added to the force pool will have been forgotten as there was no ID to add them to. So you need to work out which techs have added ships that now exist and add the correct number to the force pool. This has to be done for every country you add ships to and for every this unit you add.

Having done this there are some caveats.
i) Everybody in the game has to have the changes. If a player tries to look at an added unit in the unmodded game then it will CTD.
ii) If a future patch also adds units, or models, you will then have to resolve any collisions of IDs that result.


An alternative is to add some foreign units to their force pool - such adding 5 TUR_MER1. This avoids the ID and CTD problems, but suffers from replacements being the wrong type.

A third option is foreign shipbuilding - instead of adding units to their force pool you have scripts where they pay another nation who builds the unit for them, they then get a unit of that nation's attributes built for them. It still has the replacement issue, but as it is a foreign build ship it isn't a problem as there would be no local ability to build replacement parts.

User avatar
Kensai
Posts: 2712
Joined: Mon Sep 19, 2011 4:54 pm
Location: Freiburg, Germany

Sat May 19, 2012 1:14 pm

Yeah, I wanna die. :(
Can the devs help here? Could you add a generic ship-building capability to all nations? And please, unlock the armies of minors even if that means some unhistorical local conflicts sometimes...
Care to unify Germany as Austria? Recreate the Holy Roman Empire of the 20th Century:
Großdeutschland Mod
Are you tough enough to impersonate the Shogun and defy the Westerners? Prove it:
Shogun Defiance Mod (completed AAR)

Return to “PON Mods”

Who is online

Users browsing this forum: No registered users and 11 guests