Jump to content


Photo

Faction Spilt - for ROTWK

bfme1 style castles

  • Please log in to reply
4 replies to this topic

#1 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 23 June 2020 - 07:12 AM

So I have solved the problem with AI using BFME1 Castles / buildings / outpost unpacking etc 

The Mod is ROTWK based

 

I plan to release a Vanilla version soon

 

I also plan to Split factions 

 

I need suggestions , I don’t know how to do a voting system so just post your decisions

 

OPTION 1 - Mordor , Isengard , Dwarves ,Elves , Men , Goblins , HARAD (formerly Angmar )

 

OPTION 2 - Mordor , Isengard , Gondor , Rohan (Formerly Angmar ) ; Angmar will merge Mordor 

 

OPTION 3 - Mordor , Isengard , Gondor , Rohan (formerly Angmar ) , Elves , Dwarves , Harad ( formerly Goblins ) ; Goblins will merge Harad 

 

OPTION 4 - Mordor , Isengard , Gondor , Rohan (formerly Angmar ) , Elves ,Dwarves , Goblins ; Angmar will merge Mordor 

 

OPTION 5 - Mordor , Isengard , Gondor , Alliance (Rohan and Elves) , Dwarves , Goblins , Harad ( Formerly Angmar ) ;  Angmar will merge Mordor 

 

I am for OPTION 5 , but would like to here any suggestions , as well as a reason behind your decision

Option 5 should still be Campaign friendly ,Rohan on its own has very little to offer 

 

Coding is hard work , so I can only go with one option , one MOD

 

The mod will bring back BFME 1 style gameplay on BFME 1 Maps like Wold , as well as allow for Free build on existing maps

AI will be fully functional as needed for buildings  


Edited by JUS_SAURON, 23 June 2020 - 07:22 AM.


#2 Kwen

Kwen

    Vileartist

  • T3A Staff
  • 4,865 posts
  • Location:Korea I wish
  • Projects:It'sa secreeet
  •  T3A's First N00b
  • Division:BFME
  • Job:T3A Expert
  • Donated

Posted 04 July 2020 - 01:09 AM

Could you give some insight as to how you solved the AI issue? I assume you mean that you solved it without having to write completely new AI scripts as other have done before?


                           https://www.twitch.tv/vileartist - Yes shameless self-promotion

          ----------------------------------------------------------------------------------------------------------------------

                            "Old modders never die, they just fade away" ~ Hostile


#3 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 08 July 2020 - 02:20 AM

Sure Kwen , I will reply in a bit 

I had to write Map scripting , then using a master script , I just imported into other maps

I did not mess with the Player AI template stuff , so the game uses its normal AI for powers and unit builds ,

And it used my scripts for Building builds and expansions etc (as there is no Porter ) for all Skirmish Factions 

 

Here is the MOD for ROTWK

 

I am also releasing a MOD for BFME2 , basically just updating POWER OF THE RING with these new maps

 

https://www.moddb.co...d#downloadsform



#4 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 08 July 2020 - 03:03 AM

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.


#5 JUS_SAURON

JUS_SAURON

    El Shaddai

  • Members
  • 1,581 posts
  • Location:Trinidad
  • Projects: BFME2 MOD - Power Of The Ring
  •   INI Coder

Posted 25 July 2020 - 12:10 AM

A minor update , hunting Fake Capture-flag objects work great for ROTWK , but not at all for BFME2 

Thankfully I have a very nice solution 

Fake Crate/OneRing objects work fine , in conjunction with the HordeScan code that allows for the Hordes to hunt for these objects 

The fake crates are only seen by AI , not a human player 

They vanish and then the other bits of code allow for unpacking 

Also I added scripts that allows for spawning of these Fake Crates whenever the Expansion Flag is owned by Civilian Player 

So hordes always try to get to the farms or expansion plots , then unpacking happens 

So far the testing is almost as good as BFME1 AI for hunting and unpacking 
 


Edited by JUS_SAURON, 25 July 2020 - 12:20 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users