Jump to content


Photo

Is it possible to have one faction use two different builders?


  • Please log in to reply
5 replies to this topic

#1 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 15 October 2011 - 06:03 PM

Why I ask is I want to make something inbetween "Summon an ally's fortress" (mini version like the dwarven summon fortress) and "Summon allies".

I want to summon a miniture version of an allied faction's fortress with a builder that can build two or three of their buildings but I don't know if when used by a computer controlled player, would they use the builders.
I know I would have to make a new fortress and base file for the new mini faction but just wondered would the AI use them.

Thanks.

Cronus.

Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#2 EggyDan

EggyDan

    Eodynn

  • Members
  • 182 posts
  • Location:UK

Posted 17 October 2011 - 02:29 AM

I believe the AI will only utilise one type of builder object per faction, even if multiple ones are defined in the skirmishAIdata file.

A way around this would be to have your mini-fortress building grant an upgrade to builders it creates. This upgrade transforms your normal faction builder into the secondary builder (changing model/animations, commandset etc. Replacing the object itself wouldn't work). Obviously not ideal, as you are probably stuck with the original builder's voices etc, but that's all I can think of off the top of my head.

Unless, you use the upgrades that the AI players get inherently to change the commandsets of their fortresses to build this combined builder unit as described above, but for a human player the commandsets would let them build the builders as separate objects. This would let the AI use the two-in-one builder, while allowing the human player to use both builders, so that models/animations/sounds etc do not need to be messed with! This method may be the best bet

Hope that helps!

#3 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 17 October 2011 - 09:34 AM

Thanks for the reply Dan.

After a load of messing about late lastnight, I found two things.
Firstly: If a second builder is added to a faction in the skirmishAIdata and then given as one if that faction's Starting Units in playertemplate, the faction will use the new builder also. But........
Secondly: The faction will only use the builder to build buildings that are on the first builder's commandset (providing that both builders can build some of the same buildings). The reason for this, I think, is that the AI will only use one base file (eg. ai base - angmar - base_01) at a base template and unless the buildings on the second builder's commandset are in that base file, the builder won't build them.

So... That kinda limmits what I can do. Unless I edit every base file to include the new mini fortress/base, I will not be able to get the AI to build a little mini-faction in the same way it goes about building their own bases. But I can use a second builder to allow them to make new buildings.
An idea I came up last night was to try make an old mini base thing like from BfmE1 (a keep and 3 build plots) for the second builder to build and then tell the AI that its a farm/resorce building so that they can build it where they like (within reason as can only be built where farms can). I would also have to add MaxSimultaneousOfType = 1 to the structure file to stop the builders building loads of them. In a perfect world, I would have the build dissapear when he had finished building the mini-base but im not sure if that can be done.

Anyhow, thanks again for the reply Dan,

I'll try this and see what happens.

Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#4 newbkiller.williams

newbkiller.williams
  • Members
  • 66 posts

Posted 16 December 2011 - 10:18 PM

just add it to starting units , duh you can then use it to build all the other factions buildings you dont need to add anything to skirmish ai
_[ ]_
{-_-}
THE LEGEND

#5 Titan Cronus

Titan Cronus

    Do unto Others...

  • Members
  • 693 posts
  • Location:Ireland
  • Projects:The Battle of the Pelennor Fields Mod.

Posted 16 December 2011 - 11:52 PM

Thanks for the reply fella.

I had thought of that already but I wanted the porter to be recruited from an inn so would not work if we had him from the beginning. What I have done is just add the porter to the bit of code in skirmishai where we can define the porters for the different factions and that seems to have worked.

Battle of the Pelennor Fields

Made by 1 guy, has 13 Factions, 75+ Heroes, 150+ different units and 200+ Special abilities.

 

http://www.moddb.com...pelennor-fields


#6 Mouth of Sauron

Mouth of Sauron

    title available

  • Members
  • 252 posts
  • Location:Barad-Dûr

Posted 18 December 2011 - 09:33 PM

Yes, you can use and/or build different porters. In my mod I created merged good and evil superfactions that use special builders who can build Gondor/Rohan, Elven/Dwarven or Mordor/Harad/Rhun, Mordor/Isengard structures, and Angmar fortress, these special builders are the ones the player gets from the start of each battle, and the fortresses than build standard builders for each faction.

If you wanted this kind of builders to work with the AI, you would need to improve the bases. The commandset is not enough, you need to specify the location of every specific building you want the AI to create ; but for human players this is not needed of course.

There are many ways you can use... you may add a Rohan/Elven/Dwarven builder to the Gondor fortress for instance, this would be the easiest solution. I advice also to download the SEE and see how they did for the swap of builder's commandsets - it doubles the number of structures any builder can create.

MoS

Edited by Mouth of Sauron, 18 December 2011 - 09:35 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users