It has long bothered me that i have to train units in order to level up my buildings, which for obvious reasons becomes impossible when i have reached my command limit. I would like to be able to rank up my buildings without having to train units. Like in bfme 2. Or just have the buildings in level 3 from start.
Please help me solve this problem. Maybe there is a mod for it, maybe i can mod it myself by editing some files. I don't know. But i hope someone here does.
Level up buildings
#1
Posted 22 December 2014 - 09:25 PM
#2
Posted 22 December 2014 - 11:55 PM
Depending on how much coding experience you have, this is what you need. I don't know if this system works reliably in BFME 1, I cannot guarantee that.
If you take a look at the BFME 2 Orcpit.ini, you will find this:
^Your BFME 1 Orcpit object will need this. This stuff requires you to supply a new CommandSet for every level of the orcpit, like this:
You will need to create the level up buttons now in CommandButton.ini:
You will then need to create the required upgrades in upgrade.ini to define the cost and buildtime. You can create upgrades for each building individually, but I recommend to keep the amount of upgrades minimal. It's way more work to do that.
Now the orcpit should be upgradable and get the new button in its CommandSet. If this doesn't work, let me know. As I said, this might be a little bit different than BFME 2. Or I could've made a mistake as I rushed through the ini files of BFME 2 and adjusted them a little bit.
Edited by Echo, 22 December 2014 - 11:59 PM.
#3
Posted 23 December 2014 - 01:34 AM
Unfortunatley i have very little coding experience. So if you wish to guide me through it you would have to give a more detailed explaination that this but i can't expect that from you. I can accept that this is too advanced for me and i still appreciate very much that you took your time to try to help me.
#4
Posted 23 December 2014 - 10:02 AM
https://www.twitch.tv/vileartist - Yes shameless self-promotion
----------------------------------------------------------------------------------------------------------------------
"Old modders never die, they just fade away" ~ Hostile
#5
Posted 23 December 2014 - 11:44 AM
As far as BFME1 goes, it would probably be much more simple to just make an upgrade mirroring banner carriers, and just apply that to the building. I don't know if the BFME2 building code will work.
I checked game.dat for all the relevant stuff, and it should work.
Unfortunatley i have very little coding experience. So if you wish to guide me through it you would have to give a more detailed explaination that this but i can't expect that from you. I can accept that this is too advanced for me and i still appreciate very much that you took your time to try to help me.
That's ok.
However, now over the Christmas time my schedule is rather thin, so answers might take longer. First, you will have to download finalbig editor - http://www.moddb.com...inal-big-editor
Once downloaded, create a new folder (preferably on your desktop). Open up INI.big with FinalBIG.exe. Note that finalbig.ini must always be in the same folder as FinalBIG.exe, or else it will not work. Go to Edit -> Extract All -> Extract the entire file to your newly created folder. Go to that folder, open up data, open up ini, and there you can see a whole lot of .ini files. They are editable with the text editor, but I recommend using Notepad++ to edit them.
Once you have done all this, report back.
#6
Posted 24 December 2014 - 01:37 AM
Okey Echo. I have done as you said. I created a new folder on my desktop and extracted INI.big to it. But why is it on my desktop? Should it not be in the BFME folder?
#7
Posted 24 December 2014 - 08:02 AM
The reason is because you are going to make your changes separate from the game, then compile them into a .big and have it be separate from the game files.
https://www.twitch.tv/vileartist - Yes shameless self-promotion
----------------------------------------------------------------------------------------------------------------------
"Old modders never die, they just fade away" ~ Hostile
#8
Posted 24 December 2014 - 05:07 PM
As Kwen said, for editing purposes, it's practical to have it on desktop because you will only make changes there and re-compile it as .big once you are done changing stuff.
What you should do now is go to data\ini\object\evilfaction\evilfactionbuildings.ini. Find (Ctrl + F) "Object MordorOrcpit" (capitalization doesn't matter unless you set it). Object code is split into different sections. All of EA's object have the same order:
- Art (models, animations, textures) - found below ; *** ART Parameters ***
- Display/Gameplay information (mostly things that are visible to the player, such as display name, build cost, vision etc.) - labeled ; ***DESIGN parameters ***
- Audio Information (Which sounds this object is supposed to play under different circumstances) - labeled ; *** AUDIO Parameters ***
- Engineering parameters (Abilities, powers, locomotors, upgrade handling etc.) - Identified by ; *** ENGINEERING Parameters ***
So, now that you have found the orcpit, find (Ctrl+F) or go to the ; ***DESIGN parameters *** section, find the line that says
CommandSet = MordorOrcPitCommandSet
and replace the commandset like this:
CommandSet = MordorOrcPitCommandSetLevel1
Next up, go to the ; *** ENGINEERING Parameters *** section, and paste this somewhere: (I'd paste it below KindOf)
We now tell the orcpit to upgrade the CommandSet once it receives the named upgrade. This is required because what we do basically is giving the orcpit a banner carrier upgrade so it ranks up, but we need 2 upgrades because the orcpit levels up twice.
Ok, we're done with the orcpit. Save the file and close it. Next file to edit is data\ini\commandset.ini
We need to create the new commandsets now. To do this, paste this to the top or bottom of the file (your choice, I have a habit of adding new code to the bottom of files but it doesn't matter in this case):
Now we're done with commandset.ini. Save the file and close it. Next file to edit is commandbutton.ini.
We have to create the upgrade buttons that we added to the new orcpit commandsets, because obviously they do not exist yet. Again, add this to the top or bottom of the file:
That'd be it for commandbutton. Save the file and close it.
Last file to edit, upgrade.ini. We now have to create the upgrade that causes the orcpit to level up.
Save the file, close it. Now create a new .big file. To do that, simply create a textfile and change .txt to .big. Name your file __lillikonkomod.big (just pick any name but keep the __ in front). Open the big file, Edit -> Add Directory. Now find your BFME folder on your desktop (or wherever you put it ), and click on data once and add the directory. In your .big file, all files should now display as data\ini...
Put the new .big file in your EA Games\The Battle for Middle-earth folder. You can not play online against others as long as this new .big file is in there, so if you want to play online you will have to remove it from the folder first. Now you can go check if you can upgrade the orcpit to level 2. Let me know if it works.
Alright, enough text written on Christmas Eve.
Have a nice Christmas all!
Edited by Echo, 24 December 2014 - 05:23 PM.
#9
Posted 25 December 2014 - 08:34 PM
The mod works... partially. I can uppgrade the orcpit to level 2 but after upgrading it to level 3 it simply becomes unusable. It can't do anything, not even demolish, all the buttons dissappear.
Edited by lillikonko, 25 December 2014 - 08:58 PM.
#10
Posted 25 December 2014 - 11:59 PM
Oh yes, obviously. My bad..
We're referring to a commandset that does not exist. Go to the orcpit code in evilfactionbuildings.ini
Replace this code
Behavior = CommandSetUpgrade ModuleTag_MordorOrcPitLevel3 TriggeredBy = Upgrade_StructureLevel3 CommandSet = MordorOrcPitCommandSetLevel3 End
with this
Behavior = CommandSetUpgrade ModuleTag_MordorOrcPitLevel3 TriggeredBy = Upgrade_StructureLevel3 CommandSet = MordorOrcPitCommandSet End
Let me know if this works better
#11
Posted 26 December 2014 - 12:42 AM
It works perfectly! The only thing that could be corrected (but it's absolutley not important) is that the upgrade doesn't seem to have a name so when i hold the mouse over the button it says MISSING: "something i don't remember". But it works perfectly. Sad that it only applies to the orcpit. I would love to have that upgrade for all buildings that train units But at least now i know how it's done, kindof.
Thank you so much for your help my friend
#12
Posted 26 December 2014 - 02:11 AM
I'm glad I could help
For the Upgrade name to display correctly, you could add a lotr.str (I attached the current lotr.str of patch 1.06).
lotr.zip 129.24KB 187 downloads
Simply unzip it and extract it to your mod folder. It goes right into data (NOT in ini) so the path for it should be data\lotr.str
You can edit .str files with windows' text editor or notepad++. To label the new buttons correctly, go to the new upgrades in upgrade.ini and the new buttons in commandbutton.ini. The text we're looking for is:
CONTROLBAR:UpgradeMordorOrcPitLevel2 (<< this is the button name/header, for instance 'Word of Power')
CONTROLBAR:TooltipUpgradeMordorOrcPitLevel2 (<< this is the description that appears below the button name. In case of Word of power, this would be the "Required: Rank 10 \n Kill surrounding enemies \n left click to activate"
CONTROLBAR:UpgradeMordorOrcPitLevel3
CONTROLBAR:TooltipUpgradeMordorOrcPitLevel3
UPGRADE:ImproveStructureToLevel2
UPGRADE:ImproveStructureToLevel3
Now we will need to add these entries to lotr.str. Just open lotr.str and paste the code below (to the top or bottom, doesn't matter):
CONTROLBAR:UpgradeMordorOrcPitLevel2 "Upgrade Orc Pit to Rank 2" END CONTROLBAR:TooltipUpgradeMordorOrcPitLevel2 "Allows research of the Fire Arrow and Banner Carrier upgrade \n +25% Faster Build Speed" END CONTROLBAR:UpgradeMordorOrcPitLevel3 "Upgrade Orc Pit to Rank 3" END CONTROLBAR:TooltipUpgradeMordorOrcPitLevel3 "+50% Faster Build Speed" End UPGRADE:ImproveStructureToLevel2 "Upgrade Structure to Rank 2" END UPGRADE:ImproveStructureToLevel3 "Upgrade Structure to Rank 3" END
I'll explain how this works, but it's fairly simple: First comes the text that we assigned in commandbutton.ini/upgrade.ini (CONTROLBAR:UpgradeMordorOrcPitLevel2 in this case), then comes the name that you want to assign (remember to always put the name between " or it is not going to work. I used "Upgrade Orc Pit to Rank 2" as button name, but just alter it to your liking. \n triggers a line break. Then, as always, end the code by putting an END to the end.
For the description it's the same procedure. I used "Allows research of the Fire Arrow and Banner Carrier upgrade \n +25% Faster Build Speed" as a description. Again, alter that to your liking.
And that's it, for the orcpit.
You can do that for all other structures easily. I could've done all of this for you, probably.. then again I think if you're interested in altering the game slightly, it's best to understand the basics so you do not completely rely on others when it comes to modding. Also, I'm working hard on my own mod at this point. What you have to do for the other structures is not hard, and does not even take very long. It's copy and paste from the current code and just altering the structure names. And unless you want different upgrades for different structures (which you could do in case you want to make the cost different for a few structures), you don't need to add more upgrades to upgrade.ini.
The objects you want to look for are unit production buildings, right? This is a list of all the structures that you will need, then:
Found in evilfactionbuildings.ini:
Object MordorHaradrimPalace
Object MordorMumakilPen
Object MordorTrollCage
Object MordorSiegeWorks
Object IsengardUrukPit
Object IsengardWargPit
Object IsengardArmory
Object isengardSiegeWorks
Found in data\ini\object\goodfaction\goodfactionbuildings.ini:
Object RohanStable
Object RohanArcherRange
Object RohanArmory
Object GondorArcherRange
Object GondorBarracks
Object GondorStable
Object GondorWorkshop
Object GondorForge (This is the blacksmith, I personally do not recommend the upgrade for the blacksmith as it levels up on its own by gathering ressources, but it's your choice)
A word of advise before you get started with the rest: Always make backups. It might happen that you get crashes at some point. That is not really a problem in most cases, but sometimes your game does not tell you where the issue is, and then you will be in trouble if you do not have backups. And I recommend to mod in your mod folder on your desktop, and not directly in the .big file. The editor there is bad and can cause tremendous bugs, like deleting the first few letters of code from some files and causing endless error messages.
Happy modding, and if there is anything you need help with, just ask.
Edited by Echo, 26 December 2014 - 08:38 PM.
#13
Posted 26 December 2014 - 02:51 AM
Alright so i think i will skip that process with the name. Especially if i amd going to change all buildings
So do i just add the same texts as you showed me before but change the name of the building to GondorBarracks for example. And then add a new piece of code for every building? Sounds simple but boring.
And you are right about me wanting to learn. So i will at least try do do it myself.
Thank you again. My gratitude is endless. I would kiss you on the mouth if i could
#14
Posted 26 December 2014 - 03:32 AM
The process with the name will not take you long, I just explained it in very much detail and probably made it more confusing than it actually is
I'll now look at post 8 and explain everything that needs to be changed for the other structures.
CommandSet - Every unit-producing structure has a different commandset (or else they could not produce different units, obviously). GondorBarracks for instance have the GondorBarracksCommandSet. Rename it to GondorBarracksCommandSetLevel1 as we did earlier with the Orc Pit.
Next, add the stuff to ENGINEERING PARAMETERS: (NOTE: You do not have to change the ModuleTag_ line, but you can do that of course. The only thing that you need to watch out for is that a structure does not get the same module tag twice. The ModuleTag_ is just the name of the module, so it has to be unique and may only appear once within the same object)
Behavior = LevelUpUpgrade ModuleTag_LevelUpMordorOrcPitLevel2 TriggeredBy = Upgrade_ImproveStructureToLevel2 LevelsToGain = 1 LevelCap = 3 End Behavior = LevelUpUpgrade ModuleTag_LevelUpMordorOrcPitLevel3 TriggeredBy = Upgrade_ImproveStructureToLevel3 LevelsToGain = 1 LevelCap = 3 End Behavior = CommandSetUpgrade ModuleTag_MordorOrcPitLevel2 TriggeredBy = Upgrade_StructureLevel2 ConflictsWith = Upgrade_StructureLevel3 CommandSet = MordorOrcPitCommandSetLevel2 ;// -->> Change to GondorBarracksCommandSetLevel2 End Behavior = CommandSetUpgrade ModuleTag_MordorOrcPitLevel3 TriggeredBy = Upgrade_StructureLevel3 CommandSet = MordorOrcPitCommandSet ;// -->> Change to GondorBarracksCommandSet End
Next step, add the new CommandSets for the barracks. Find (Ctrl+F) the default CommandSet for the Gondor barracks in commandset.ini, GondorBarracksCommandSet. Copy it, paste it twice to the top or to the bottom of the file. Rename one to GondorBarracksCommandSetLevel1, the other one to GondorBarracksCommandSetLevel2. Add the upgrade buttons (the command must match the command in commandbutton.ini that we are going to add after this, logically). Change Command_Sell from 3 to 4 for the new CommandSets, as 3 will be our new upgrade button.
CommandSet GondorBarracksCommandSetLevel1 1 = Command_ConstructGondorFighterHorde 2 = Command_ConstructGondorTowerShieldGuardHorde 3 = Command_UpgradeGondorBarracksLevel2 4 = Command_Sell End CommandSet GondorBarracksCommandSetLevel2 1 = Command_ConstructGondorFighterHorde 2 = Command_ConstructGondorTowerShieldGuardHorde 3 = Command_UpgradeGondorBarracksLevel3 4 = Command_Sell End
Now, copy the 2 buttons you made for the orc pit, paste it above/below the orcpit code and change the necessary lines. I highlighted what you need for the Level 2 Barracks, try it yourself for the level 3 button.
CommandButton Command_UpgradeMordorOrcPitLevel2 ;// Rename the button to our new command, Command_UpgradeGondorBarracksLevel2 Command = OBJECT_UPGRADE Object = MordorOrcPit ;// --> This upgrade is going to affect the barracks object, so change MordorOrcPit to GondorBarracks Upgrade = Upgrade_ImproveStructureToLevel2 Options = CANCELABLE TextLabel = CONTROLBAR:UpgradeGondorBarracksLevel2 ;// <-- Only relevant if you are going to add a lotr.str ButtonImage = BRArmory_Banner ButtonBorderType = BUILD DescriptLabel = CONTROLBAR:TooltipUpgradeGondorBarracksLevel2 ;// <-- Only relevant if you are going to add a lotr.str Radial = Yes InPalantir = Yes End CommandButton Command_UpgradeMordorOrcPitLevel3 Command = OBJECT_UPGRADE Object = MordorOrcPit Upgrade = Upgrade_ImproveStructureToLevel3 Options = CANCELABLE TextLabel = CONTROLBAR:UpgradeMordorOrcPitLevel3 ButtonImage = BRArmory_Banner ButtonBorderType = BUILD DescriptLabel = CONTROLBAR:TooltipUpgradeMordorOrcPitLevel3 Radial = Yes InPalantir = Yes End
And that's it for the Gondor barracks. You can do these things in any order, just don't forget anything. Personally, after looking up the commandset of an object, I would do step 1 after everything else is done (the rename of the CommandSet and the required adds to ENGINEERING PARAMETERS). But that is up to you.
Thank you again. My gratitude is endless. I would kiss you on the mouth if i could
That sounds creepy
Edited by Echo, 26 December 2014 - 03:51 AM.
#15
Posted 26 December 2014 - 09:03 AM
"To know what question we may reasonably propose is in itself a strong evidence of sagacity or intelligence. For if a question be in itself incongruous and begs for uncalled-for answers, it holds, sometimes, besides embarrassing the proposer, the disadvantage to seduce the unguarded listener into giving absurd answers, and we are presented with the ridiculous spectacle of one (as the ancients said) milking the he-goat, and the other holding a sieve beneath."
#16
Posted 26 December 2014 - 07:41 PM
https://www.twitch.tv/vileartist - Yes shameless self-promotion
----------------------------------------------------------------------------------------------------------------------
"Old modders never die, they just fade away" ~ Hostile
#17
Posted 29 December 2014 - 01:18 PM
Echo. I am creepy. That's how i roll Haha. Don't take it too litterally. I'm just trying to say that i am very gratefull that you helped me.
#19
Posted 08 November 2020 - 09:53 AM
Edit: REDACTED
Edited by romo2barber, 08 November 2020 - 12:12 PM.
#20
Posted 11 November 2020 - 11:34 AM
So I have an issue. I have used the above to some success but a small niggle isn't quite working correctly.
So far I have only tested the Good armies as I havent played Evil yet but if the problem exists there then I assume the same fix would work too.
Upgrading the Gondor/Rohan Stables works as expected however when upgrading the 2 archery ranges and barracks, the upgrade goes straight from 1 to 3. Does anybody know why Upgrade_ImproveStructureToLevel2 makes these structures level 3?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users