Here is a more detailed answer
So the major problem with BFME 1 style maps is that Buildings cannot be built , as this is controlled by a Porter
So you have to code each Skirmish Player to build , at varied amounts , and times
Then there is the small issue with hunting for Econ plots and Expansion plots
To fix it , you give the skirmish player a unique Upgrade - Men Boromirlaststand etc ,as a PLAYER upgrade
this then hooks into the game ini for coding
Add a do-command upgrade Behavior and it will unpack the farm etc
Hunting
This is achieved by spawning a unit ( I used Temp_Dragon strike )
This is coded to be invisible , except to AI , and has Capture flag behavior
So the AI will always go to this thing
now just add scripts to spawn at the beginning to waypoints at each Econ plot and Expansion plot
Unpacking
For farms , use the Do-Command behavior and AI will unpack
For Expansion outposts , use scripts
The Expansion Flags are each named ,so you unpack and reference them
Vary build time and build amount as you desire , I tried to stagger it to be realistic as original
Issues which have been solved
1. The Castle flag object and the Expansion flag object is originally coded to never be destroyed
The AI will not use it if it has been used and destroyed , it only ever uses it if it’s fresh
So you have to code it to be destroyed totally , like a fortress
Then code in scripts to spawn a new one at that same location
How it looks is very close to original , as the previous Outpost is destroyed and a new flag is born
Just keep the WayPoint on the EconFlag object when setting up a map
2. To get the AI to re-use a Castle is fairly easy , but the build may be obstructed by map objects , and a wall will be missing
I somewhat perfected the delayed geometry code , so this works flawless so far
3. AI clump up when a farm is unpacked , fix this with Delay geometry
It seems the AI does not expect the farm (lumbermill) , so they can’t path normally
but if the object unpacking is small , it’s fine
4. Farms outside a base mess up command points when destroyed
This is fixed by a fake command point object that is spawned using code from the replica farm object
If you open a map and look at the scripts
You notice a few in civilian , which handles the spawning of the Fake Capture flag and its fake Linked to flag object
Then in each Player folder , that handles base buildup at start
The true bit of coding is in the Skirmish folders , to get AI to function
This was pure torture , I gave up years ago , then had a breakthrough after a breakdown
All Factions are basically copy/paste , just change each building as needed
I fully tested and I fixed as many issues as I could see
To implement as a Template
1. Get a BFME 1 Map
2. Set all start position waypoints as beacon
3. Rename Gondor and Rohan folder to Player_5 and Player_6
4. Import the all important script (which I will have available )
5. Drop in Wayponts at each location , ECON1 to ECON14 for Econ plots
6. Drop in Waypoints at each location , BASE5 to BASE10 for Expansion plots
7. Drop in Waypoints for Gollum , see a guide on 3rd age
Mod Ini files
civilian buildings , Gondor buildings , Rohan Buildings , camps and castles , and some new farm and Lumbermill object files
A few upgrade changes and a few command set and command buttons
A few objects added for fake Capture flag hunting
And each map has the map.ini file (same file)
this is to keep the Main files as vanilla as possible ,this fixes the farms Money setup and some other issues
Also proper base files and I left my few models that I plan to use for future coding , I just have to copy paste some old code from my BMFE2 eventually , or never
I may just go back to playing and modding my BMFE2 MOD as it’s also implemented there
PS , because I hated Angmar as a faction I never played ROTWK much , but I recoded it so it is Harad
Edited by JUS_SAURON, 08 July 2020 - 03:41 AM.