Jump to content


Photo

BFME2 remove catapults/ballistas


  • Please log in to reply
66 replies to this topic

#1 Bajsapan

Bajsapan
  • New Members
  • 4 posts

Posted 08 August 2015 - 11:25 PM

I've been trying to find out how to remove ballistas and catapults with no luck. Does anyone know how to remove them? I'd appreciate if someone could help me. :)



#2 Elric

Elric

    Designer

  • Hosted
  • 2,857 posts
  • Projects:Middle-Earth Expanded
  •  Coder
  • Donated

Posted 09 August 2015 - 12:22 AM

What exactly do you mean by remove? Remove all traces of them from the game? Or remove them from the siege buildings and the ai?


Edited by Elric, 09 August 2015 - 12:23 AM.


#3 Maximan

Maximan

    3D Animator

  • Hosted
  • 572 posts
  • Projects:BFME:Classic Edition, Animator on The Horse Lords, Animator on Shadow and Flame, Animator on An Unexpected Mod.
  •  BFME Animating, AI Coding, .BIG Coding, Map Scripting

Posted 09 August 2015 - 07:10 PM

just remove the commandbutton from the buildings you buy them at



#4 Bajsapan

Bajsapan
  • New Members
  • 4 posts

Posted 09 August 2015 - 11:25 PM

What exactly do you mean by remove? Remove all traces of them from the game? Or remove them from the siege buildings and the ai?

I want to remove them from the AI.

 

just remove the commandbutton from the buildings you buy them at

How do I do that?


Edited by Bajsapan, 09 August 2015 - 11:39 PM.


#5 Kwen

Kwen

    Vileartist

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

Posted 10 August 2015 - 01:35 AM

The first question that I have for you is how are you set up for modding? Are you creating a mod using the -mod command method?

To remove the siege units the easiest way is to go into commandset.ini and find the siegeworks buildings. In there you just remove the lines that are for the bsllista and catapults.

For the AI to stop using them, there us a different ini that you have to edit. I believe it is called aiskirmishdata.ini (though I might be wrong)

Edited by Kwen, 10 August 2015 - 01:36 AM.

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

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

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


#6 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,847 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 10 August 2015 - 07:33 AM

Well the \ini\default\skirmishaidata.ini (which kwen meant) can stop them from building those without actually removing the button, the other method is indeed removing the button :p


Ridder Geel

#7 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 10 August 2015 - 05:54 PM

If you want to remove them because, like me, you hate how early some factions build them and how they take some of the fun out of  game, then I would suggest not removing them but changing how the game uses them.

 

For example:

You could change how late the AI actually builds the structure that creates them (by gingo into the base files and changing the siege structures to Phase 3 with a priority of like 50)

You could change at what level the siege structures have to be before they can build them.

You could increase the cost of them.

You could change how many of them the AI wants to build (by going to skirmishaidate and changing the PercentageOfArmyPhase# in their ArmyMemberDefinition to something like 1.0)

 

If you want more information on these ideas, just ask.

 

 

If you still just want to remove them though, I would personally suggest just commenting out the command buttons from the siege structures command sets. If they can't be bought, the AI (and you) can't use them and it shouldn't cause any problems with the AI.

The thing you'll want to keep in mind is that not all factions use trebuchets, some factions use ents or mumakil as siege weapons as siege and you don't want to unbalance the game.


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


#8 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 17 September 2015 - 02:34 AM

If you want to remove them because, like me, you hate how early some factions build them and how they take some of the fun out of  game, then I would suggest not removing them but changing how the game uses them.


You could increase the cost of them.

 

I'm very interested in this. I like to relax and turtle, but the range and strength of seige ammunition breaks the flow somewhat. I used to have a small mod added that simply made the command point cost of things like Catapults too high for anyone to build (But not the wall upgrades obviously) And that was a way I liked to play it.

I have a very poor understanding of my files and I'd like to be able to do this, but I've not been able to find any sort of sufficient guidance to do so, could you help me out?

Alternatively changing the range and damage of those projectiles, so that they have to be in the range of my archers would be suitable too.



#9 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 17 September 2015 - 08:56 AM

Ok man, my suggestion to you would be to change the AI's priority for building them.

 

This is quite a simple process and only requires editing one file (if I remember correctly). Basically, the AI builds its base in three phases and depending on what phase it's on, it will only use certain units. All we're going to do is make it so it will only build siege weapons when it has reached phase three. We will then make it so it only uses one percent of its total command points on them (you'll be lucky if you see any siege weapon at all with a percentage that low).

 

The file you want to edit is skirmishaidata.ini (data/ini/default/skirmishaidata). In this file, you have all the AI's setting for build priorities (and all other kind of things). Use the Find tool (Ctrl + F) and search for ArmyMemberDefinition. When you find the first one, start to go down through them, looking for any siege weapons. Keep in mind that you're also looking for things like Ents and Battering rams as well as the obvious Trebuchets, Catapults and Ballista.

 

This is what the Gondor Trebuchet definition looks like:

	ArmyMemberDefinition GondorTrebuchet_Member
		Unit			= GondorTrebuchet ;seige weapon
		PercentageOfArmyPhase1	= 5.0
		PercentageOfArmyPhase2	= 20.0
		PercentageOfArmyPhase3	= 25.0
	End

Now you want to change it so it only builds in phase three and only with the lowest priority. It should look like this:

	ArmyMemberDefinition GondorTrebuchet_Member
		Unit			= GondorTrebuchet ;seige weapon
		PercentageOfArmyPhase1	= 0.0
		PercentageOfArmyPhase2	= 0.0
		PercentageOfArmyPhase3	= 1.0
	End

Make sure you go through all the definitions and find all the different types of siege weapons and edit them accordingly. You can of course change all the phases to 0.0 and completely remove the AI's ability to build them at all.

 

 

I'm almost certain doing this will give you the desired effect with minimum effort. Good look man and let me know how it goes. :thumbsuphappy:

 

 

ADDED: It might be a good idea to a comment out the old values as apposed to overwriting them (in case you ever want to undo the changes without deleting the file). It would look like this:

	ArmyMemberDefinition GondorTrebuchet_Member
		Unit			= GondorTrebuchet ;seige weapon
		PercentageOfArmyPhase1	= 0.0		;5.0
		PercentageOfArmyPhase2	= 0.0		;20.0
		PercentageOfArmyPhase3	= 1.0		;25.0
	End

Edited by Titan Cronus, 17 September 2015 - 04:12 PM.

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


#10 Maximan

Maximan

    3D Animator

  • Hosted
  • 572 posts
  • Projects:BFME:Classic Edition, Animator on The Horse Lords, Animator on Shadow and Flame, Animator on An Unexpected Mod.
  •  BFME Animating, AI Coding, .BIG Coding, Map Scripting

Posted 17 September 2015 - 01:55 PM

To remove the button I'd assume you'd find the commandset for the building that builds your desired catapult, and then remove the button from the list, and it should be unbuildable.



#11 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 17 September 2015 - 04:07 PM

That would indeed be correct. :) I do think that my method is easier and nicer though. :p It keeps the command button so the player can still build them. Also, it's easier to remove at a later date if you decide, you just delete the file. Quite often the commandset ini is heavily edited in mods so it would require you going back through it adding the command buttons back in.


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


#12 Kwen

Kwen

    Vileartist

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

Posted 17 September 2015 - 04:24 PM

I'm not sure if removing the button would stop the AI from using them though, so for total elimination you would need to do both, I believe.

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

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

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


#13 Maximan

Maximan

    3D Animator

  • Hosted
  • 572 posts
  • Projects:BFME:Classic Edition, Animator on The Horse Lords, Animator on Shadow and Flame, Animator on An Unexpected Mod.
  •  BFME Animating, AI Coding, .BIG Coding, Map Scripting

Posted 17 September 2015 - 04:35 PM

you just have to add a ; infront of the command button lol, if you want it back just remove the ; -- I don't think the AI builds it, if it isn't there



#14 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 17 September 2015 - 04:40 PM

Yea, I'd tend to agree with Maximan, I don't think the AI will build it if there is no command button.

 

I know you can comment it out Maximan but when you want to add them back in, there are a lot of command sets to go through to put them all back in. IMO, it just feels easier and tidier to do it all in the skirmishaidata file. :)


Edited by Titan Cronus, 17 September 2015 - 04:41 PM.

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


#15 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 17 September 2015 - 06:20 PM

My files seem a little different for whatever reason, but in Ini.big I found the values I was looking for.

I changed
GondorTrebuchet_Member
WildMountainGiant_Member
ElvenEnt_Member
IsengardBallista_Member
DwarvenCatapult_Member
MordorCatapult_Member

down to 0.1 on level three (I figured I'd put it even lower as I often play with max command points)

While I was looking around I noticed that the rams for Isenguard and Mordor are entirely zero. If they can break through my archer cover, they deserve to get a wall or two broken, so I increased

 

IsengardBatteringRam_Member
MordorBatteringRam_Member

 

to 2.0 (Dwarven BatteringRam was 4)

 

Time to test this :D



#16 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 17 September 2015 - 06:32 PM

Well looks like that didn't work. Upon opening the game I got this:

 

 

Unknown block 'is'.

Error parsing INI block 'is' in file
'Data\INI\Default\SubsystemLegend.ini'.
7 addresses:
(unknown)(0): game.dat+241550 Debug::PostStaticInit+3390
(unknown)(0): game.dat+2294796
FXParticleSystem::DefaultModuleKey<0>::operator=+209278
(unknown)(0): game.dat+2325810
GameClientRandomVariable::setRange+15179
(unknown)(0): game.dat+6460555 Xfer::operator==+119787
(unknown)(0): kernel32.dll+78698 BaseThreadInitThunk+18
(unknown)(0): ntdll.dll+235650 RtInitializeExceptionChain+99
(unknown)(0): ntdll.dll+235605 RtInitializeExceptionChain+54

Because of the severity of this error the game will now exit.

 

I'm guessing it's referring to the changes I made, but beyond that I don't really understand what the issue is. Anyone have any ideas?



#17 Mathijs

Mathijs

    Post-modern Shaman

  • Network Leaders
  • 13,706 posts
  • Projects:Age of the Ring
  • Division:Revora
  • Job:Leader

Posted 17 September 2015 - 07:17 PM

That sounds like a typo or misplaced bit of code. Look for a separated 'block' called 'is' that doesn't have an END.


No fuel left for the pilgrims


#18 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 17 September 2015 - 08:24 PM

That's not even in the skirmishaidata file, it is an error in a file in the same directory though (the file is subsystemlegend). :p If you have not edited anything in that file, then you must have made an accidental edit/entry/typo. If you have done some editing in that file then you need to go over it a look for an error like Mathijs said. I reckon that you might either be missing an "end" or have one too many somewhere. Failing that, you might added the word "is" somewhere where it does not belong.

 

 

 

ADDED: I think that your file was a little different (I'm guessing that you mean the Member percentages were different) because you using BfMEII (from what I can gather) and the code I posted was from WotWK. I wouldn't worry about it. ;)


Edited by Titan Cronus, 17 September 2015 - 08:29 PM.

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


#19 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 17 September 2015 - 09:10 PM

Yeah, I don't have WotWK.

 

I'm not really sure what "end" "is" mean in this sense, are you saying the letters I and S are added in somewhere by accident, or are we talking about a specific code?

 

At first I thought the way I'd commented on it was wrong, so I tried removing that. I now have the same error as before but with ':' instead of 'is'


Edited by Valdrec, 17 September 2015 - 09:16 PM.


#20 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 17 September 2015 - 09:18 PM

 Look for a separated 'block' called 'is' that doesn't have an END.

 

I'm a bit to newb to fully understand this, but there are 800k lines, I'm not sure it will be so simple.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users