Jump to content


Photo

BFME2 remove catapults/ballistas


  • Please log in to reply
72 replies to this topic

#21 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 17 September 2015 - 09:27 PM

Hm. I reversed all the changes I made to the file, and it runs fine.

My only assumption is that Bfme2 without wotwk edits differently? I assumed it was just the ini.big file but perhaps there is something else I need to do to enable it?

Added: As I change different parts I'm getting the same error with different words. This is most confusing as these things seem to be completely unconnected.


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


#22 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 17 September 2015 - 10:01 PM

First of all, you must use a semicolon ; to comment lines, not a colon : the code will break if you use a colon. And an 'End' is basically a closing identifier of a block of code. You will see lots of them all over the place. The problem you are having is that there is either an 'End' missing somewhere, or you have something written in that the game doesn't understand and therefor it's getting confused and crashing.

 

I recommend you extract the INI.big into individual files and do it that way, instead of editing the INI.big as a whole. You will find everything is much easier to work with, and especially narrow down errors when it comes to troubleshooting. If you do this you will need to learn to use the -mod command though, but that's quite simple and there are tutorials explaining it.


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

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

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


#23 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 17 September 2015 - 10:09 PM

Ahh, you are editing in the in the .big file?

 

 

What I meant by "end" and "is" was that they are words within a file. For example:

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

In this piece of code (I would call it a block of code but not sure if that is the proper term), the first line is the name/definition of the code block, the next four lines are parameters/variables and the last line is the closing line. The closing line is always "End". (All the terms I use are just what I use when describing code, I'm not sure what the official coding terms are). In a file, there are hundreds of code blocks and sometimes an extra "End" gets added or one gets deleted and you get those errors. Sometimes a typo slips in (like the two letter word "in"), either in a code block or between two blocks.

 

When you get an error, most of the time, it tells you which file the error is in and sometimes the line. On these occasions, you go to the line of code within the said file and fix it. On occasions when the error report does not tell you which line the error is in, it's just a case of going over ever line of code you have just edited in the said file until you find the typo/error.

 

 

ADDED: Kewn posted as I was typing but said most of what I was trying to say but a lot simpler. :facepalm: I agree with him totally BTW, extracting the .ini files from the .big file to edit them and using the -mod method is by far the best way to go. :)


Edited by Titan Cronus, 17 September 2015 - 10:44 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


#24 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 17 September 2015 - 11:48 PM

Well the issue now seems to be that if I edit any of the numbers, commented or not ( I was using ; .) It picks a random word in the file and says it is the source of the error. I tried editing just one word and I got 'FILE' as the source of the issue this time :/



#25 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 18 September 2015 - 12:44 AM

As I said, extract the INI.big into individual files. Then you can start to find your errors much more simply then digging through the ENTIRE ini code of the game. 


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

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

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


#26 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 18 September 2015 - 01:19 AM

Ok man. That sounds odd. Unfortunately, because of the method you're using to make your mod (editing the .ini files while within the .big file) I can't be of much help as I have never used that method. Sorry man. I really would suggest using the -mod method, I personally think it is a far easier method for new modders.

 

I just looked on a tutorial on the3rdage.net (an excellent source of tutorials BTW, most defiantly worth checking out man) but think for a new modder, it has more information that you don't need than you do and would possibly end up confusing the issue. So, instead, I will try explain the -mod method as simply as I can.

 

First: Create a folder and give it the name of your mod. For the purpose of this instruction, we'll call the folder "ValdrecMod".

 

Second: Make a copy of the game shortcut. Edit the target (in properties). It shoud look something like this: "C:\Program Files (x86)\Electronic Arts\The Battle for Middle-earth ™ II\lotrbfme2.exe" -mod "D:\ValdrecMod"

All you're basically doing is adding the location of your mod folder to the shortcut's target. You Mod folder will likely be in a different location so your target will be different from the one above. It's all common sense really. :) (Note how there is a space on either side of the word -mod in the target, these are essential)

 

Third: Extract any .ini files you want to edit into you mod folder folder. Boromir's file, for example, after extracting the destination should look like this: ValdrecMod/data/ini/object/goodfaction/units/men/boromir.ini

 

Lastly: You can now use the edited shortcut to launch your mod.

 

 

 

 

NOTE: I would recommend making a mod with just one edited file to begin with. Once you know you have it working, start adding in other files. I reckon that a quick and easy test method would be by starting with one of the dwarven hero files (like dane). Scroll down to the end of his animation code and find this block:

	;Draw module just for the HeroSelection
	Draw = W3DScriptedModelDraw Icon
		ModelConditionState = NONE
			Model					= Icon02
		End
	End

Comment it all out like this (with semicolons like the one in front of the first Draw word in the code above):

        ;Draw module just for the HeroSelection
	;Draw = W3DScriptedModelDraw Icon
	;	ModelConditionState = NONE
	;		Model					= Icon02
	;	End
	;End

If your mod is working, when you load up the game and make dain, he will not have that stupid glowing ring thing around him like the other Dwarven heroes do. Once you have that working, you can delete him and start extreacing in the files you really want to edit and get back to making your mod.

 

 

 

I really hope all that makes sense. :) Good Luck. ;)


Edited by Kwen, 18 September 2015 - 01:35 AM.
Hope you don't mind, I added an example of the commented module. -K

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


#27 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 18 September 2015 - 08:33 AM

I'm not totally sure but I think once you have your mod tested and working, you should be able to extract your edited .ini files out of the .big files and straight into you mod. This would save you having to edit them all again. Obviously, undo any changes that were causing your previous mod to crash before extracting the .ini files or you'll just extract out the bugged files. I would also recommend that after you have all the .ini files that you edited extracted, do a total re-install of the game. This is to make sure all the .big files are exactly as they should be, unedited and untouched. Just use them as the source files from this point on and do all your editing on extracted files.

 

Here's something else that you might want to consider if you think you'll be doing a lot of editing/modding. Create another folder somewhere (called something like BfMEII) and extract all the .ini files from all the .big files into it (open each big file an do Extract All). This will give you every file and piece of art that the game uses. Now you can use this folder as your source and skip extracting files one by one as and when you need them. Like I said, you'll have them all already extracted so all you need to do is find the file you want to edit and copy/paste it across into your mod and edit away till you heart's content. :)

 

 

I know this might sound like a lot of work but what you're doing is setting up a solid base to build you mod from. You spend a bit of time now setting up everything and save yourself tons of time down the line. If your not planning to do much editing, don't bother extraction all the .ini files but I really would do a re-install after you have extracted all the .ini file that you have already edited.


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


#28 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 18 September 2015 - 09:28 AM

Phew, this is anything but simple. I'll sit down and try this stuff when I have the time, but it's a lot for a newb like me.



#29 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 18 September 2015 - 02:51 PM

Sorry man, I did think that I might be giving you an information overload. :p

 

Just take it one step at a time man and really don't feel overfaced. Just try making the -mod stuff first. Create a folder, extract the an .ini file into it to use as a test and then make the new shortcut with the edited target. It really shouldn't take long.  :)


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


#30 Maximan

Maximan

    Some Dude

  • Hosted
  • 572 posts
  • Projects:BFME: Classic Edition

Posted 18 September 2015 - 03:26 PM

valdrec, try mine, its the simplest one, and then tell me if it works. And this one works without mod.big



#31 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 20 September 2015 - 07:16 PM

valdrec, try mine, its the simplest one, and then tell me if it works. And this one works without mod.big

 

Try your what?



#32 Maximan

Maximan

    Some Dude

  • Hosted
  • 572 posts
  • Projects:BFME: Classic Edition

Posted 20 September 2015 - 07:27 PM

remove the commandbutton from the commandset of the building where the catapult/ballis are built from, and see if that works



#33 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 22 September 2015 - 05:13 PM

remove the commandbutton from the commandset of the building where the catapult/ballis are built from, and see if that works

 

How?



#34 Maximan

Maximan

    Some Dude

  • Hosted
  • 572 posts
  • Projects:BFME: Classic Edition

Posted 22 September 2015 - 05:17 PM

look inside the commandsets and find the building



#35 Valdrec

Valdrec
  • Members
  • 11 posts

Posted 23 September 2015 - 03:36 AM

Could you give me a more detailed answer? There is a lot of information that I don't just automatically know, being a that I am a complete newb.



#36 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 23 September 2015 - 08:27 AM

Hey man.

 

What he is suggesting is to remove the command buttons for buying the siege weapons from the structures that build them. Open the .ini for a building that builds one and use the Find tool to search for "CommandSet". Once you have found the buildings commandset, you then open the commandset .ini and using the Find tool again, you search for the building command set. Then you comment out the the line of code that has the command button for buying the siege weapon. Note: Most buildings have three commandsets, one for each level. You will need to comment out the command button for each level's command set.

 

For example:

CommandSet GondorWorkshopCommandSet
	1	= Command_ConstructGondorTrebuchet
	2	= Command_PurchaseTechnologyGondorFireStones
	3	= Command_PurchaseUpgradeGondorWorkshopLevel2
	6	= Command_Sell
End

CommandSet GondorWorkshopCommandSetLevel2
	1	= Command_ConstructGondorTrebuchet
	2	= Command_PurchaseTechnologyGondorFireStones
	3	= Command_PurchaseUpgradeGondorWorkshopLevel3
	6	= Command_Sell
End

CommandSet GondorWorkshopCommandSetLevel3
	1	= Command_ConstructGondorTrebuchet
	2	= Command_PurchaseTechnologyGondorFireStones
	6	= Command_Sell
End

Then you comment out the command button for building the siege weapon, like this:

CommandSet GondorWorkshopCommandSet
	;1	= Command_ConstructGondorTrebuchet
	2	= Command_PurchaseTechnologyGondorFireStones
	3	= Command_PurchaseUpgradeGondorWorkshopLevel2
	6	= Command_Sell
End

CommandSet GondorWorkshopCommandSetLevel2
	;1	= Command_ConstructGondorTrebuchet
	2	= Command_PurchaseTechnologyGondorFireStones
	3	= Command_PurchaseUpgradeGondorWorkshopLevel3
	6	= Command_Sell
End

CommandSet GondorWorkshopCommandSetLevel3
	;1	= Command_ConstructGondorTrebuchet
	2	= Command_PurchaseTechnologyGondorFireStones
	6	= Command_Sell
End

You have to find the command set of every structure that creates siege weapons, including Ents and Mumakil and what not, and comment out the appropriate command buttons. Like I said earlier, I don't really think that this is the best way to solve your problem though. If you look at the command set above, once you remove the Trebuchet command button, the building becomes totally useless and you can't even build one, let alone the AI. I have explained how to do it  though as the decisions is your. :)

 

Good luck.


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


#37 Bajsapan

Bajsapan
  • New Members
  • 4 posts

Posted 24 September 2015 - 01:53 PM

 

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

*Quoted wrong person bost above, mod please remove it*

 

Man, I don't know anything about coding those files, not even what program to open them with. Neither can I find the .ini files for the buildings, as I have no f*cking idea where to look. I've gone through BFME2 files at programs(x86) but can't find anything of wich you've mentioned. 

I'm using vanilla BFME2 v1.06. If someone could edit the files really quick for me, it'd be awesome. What I'm trying to figure out atm is how to remove trolls, mumakills, catapults and stuff like that, so that I can have massive infantry battles instead of getting butchered by 10+ catapults and/or trolls. Your idea seemed much better than removing siegeworks commandbuttons, incase I want to use a catapult or something. If anyone could edit those files and upload them somewhere, I'd be very thankful!  :)



#38 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 24 September 2015 - 02:28 PM

Ok man, lets say I edit the .ini file for you and upload it here for you, do you know how to get it into the .big file again so it all works fine?


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


#39 Maximan

Maximan

    Some Dude

  • Hosted
  • 572 posts
  • Projects:BFME: Classic Edition

Posted 24 September 2015 - 03:19 PM

the file is inside the ini.big inside the main bfme folder



#40 Titan Cronus

Titan Cronus

    Do unto Others...

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

Posted 24 September 2015 - 04:00 PM

On random note: Are you posting as two different members?

 

Ignore that, I see what's happened. For a moment there I thought you were Valdrec, I hadn't noticed that he wasn't the person that created the post. I have been replying to his posts assuming he was you. :facepalm: Ignore my last post as, like I said, I posted it assuming you were Valdrec

 

So, my question to you is (as Kwen asked before :)); Are you using any kind of mod already?


Edited by Titan Cronus, 24 September 2015 - 06:35 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





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users