Commandbutton in World builder
#1
Posted 26 October 2014 - 01:40 AM
#2
Posted 26 October 2014 - 02:05 AM
One of these issues I can attribute to differences between BfME and BfME II. In BfME tainted land doesn't have a timer and in BfME II it lasts for a short time.
Remember that all worlds draw to an end and that noble death is a treasure which no one is too poor to buy. - C.S. Lewis
There will come a time when you believe everything is finished. That will be the beginning. - Louis L'Amour
What will matter then will be people. If relationships will matter most then, shouldn't they matter most now? - Max Lucado
#3
Posted 26 October 2014 - 11:29 AM
Thanks for your answer. I'll try then to put some kind of code to make it everlasting. What about instead the buildplot problem? It also depends on differences between BFME 1 and 2 or it is just a bug which doesn't make the Command_Button code not working?
#4
Posted 26 October 2014 - 02:30 PM
As far as I remember, you will need new CommandButtons for the buildplots or override existing ones in map.ini. EA replaced BFME 1's construction buttons with the Porter contruction buttons and they do not work for foundations. This is why the plots do not show all buildings; EA removed most of the command buttons that belonged to foundations. This is BFME 1 code:
CommandButton Command_ConstructMordorPen Command = FOUNDATION_CONSTRUCT Object = MordorMumakilPen TextLabel = CONTROLBAR:ConstructMordorMumakilPen ButtonImage = BMMumakilPen ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is DescriptLabel = CONTROLBAR:ToolTipMordorMumakilPen Radial = Yes End
This is BFME 2:
CommandButton Command_PorterConstructMumakilPen Command = DOZER_CONSTRUCT Object = MordorMumakilPen TextLabel = CONTROLBAR:ConstructMordorMumakilPen ButtonImage = BMMumakilPen ButtonBorderType = BUILD DescriptLabel = CONTROLBAR:ToolTipMordorMumakilPen Radial = Yes End
Edit the commandbuttons/create new ones (no idea if that actually works in a map.ini) and replace DOZER_CONSTRUCT with FOUNDATION_CONSTRUCT and add the command to the commandset of the building foundation. Note that if you do that, your porter commands will be screwed. I suggest you only replace commandbuttons that are not necessary for your map; if you need porters, then do not touch porter contruct buttons. If you're doing this for a mod or an inofficial patch, maybe ask the coder to put in BFME 1's old commandbuttons? That would be the easiest way.
#5
Posted 26 October 2014 - 09:20 PM
@Echo, Thanks, that worked!!
I've also managed to make the land eternaly tainted^^. Now, I just need to figure out why the "tree control" doesn't work. In World builder, I created a script like this:
* IF *
There are Less Than or Equal To 3 comparison trees in the area "Plot 3 Area"
* THEN *
Spawn buildplot, taint land etc.
But, even if there are no more trees at all, nothing happens, and since Builders for the Player inside fortress are gone, I cannot build other buildings. Also, I wanted to ask:
I put in the map the IsengardTent2 object, from where you can recruit Orc Fighters and Orc Archers and also research Banner Carriers and Fire Arrows at level 2 and 3 respectively. So I made this code to make them be recruited from there:
CommandSet IsengardTentOverride
1 = Command_ConstructMordorOrcFighterHorde
2 = Command_ConstructMordorOrcArcherHorde
End
Object IsengardTent2
CommandSet = IsengardTentOverride
End
And the buttons correctly showed up. However, when I click on them to recruit them, nothing happens (also, I have no idea how to add a custom button to upgrade the tent to level 2 and 3 xD)
#6
Posted 27 October 2014 - 06:26 AM
Maybe you will need something like this:
Behavior = ProductionUpdate ProductionUpdateModuleTag ; nothing End Behavior = QueueProductionExitUpdate QueueProductionModuleTag PlacementViewAngle = -180 UnitCreatePoint = X:28.0 Y:-35.2 Z:0.0 // modify values as they fit best for you :p NaturalRallyPoint = X:-60.0 Y:-35.2 Z:0.0 ExitDelay = 750 End
If that doesn't work, what happens if you add FS_FACTORY and/or AUTO_RALLYPOINT to the KindOf of the IsengardTent2 object? I have no idea what FS_FACTORY does but the Gondor Archer Range has it so it might be worth a try . For the levelling of the tent, does it have an experience level? If it has, orientate yourself on existing buildings, like the orcpit:
CommandSet MordorOrcPitCommandSetLevel1 1 = Command_ConstructMordorOrcFighterHorde 2 = Command_ConstructMordorOrcArcherHorde 3 = Command_PurchaseTechnologyMordorBasicTraining 4 = Command_UpgradeMordorOrcPitLevel2 // <--- You will need a button like this for your IsengardTent2 6 = Command_Sell End CommandSet MordorOrcPitCommandSetLevel2 1 = Command_ConstructMordorOrcFighterHorde 2 = Command_ConstructMordorOrcArcherHorde 3 = Command_PurchaseTechnologyMordorBasicTraining 4 = Command_UpgradeMordorOrcPitLevel3 6 = Command_Sell End CommandSet MordorOrcPitCommandSetLevel3 1 = Command_ConstructMordorOrcFighterHorde 2 = Command_ConstructMordorOrcArcherHorde 3 = Command_PurchaseTechnologyMordorBasicTraining 6 = Command_Sell End
As you can see, the orcpit has different CommandSets on different levels, triggered by a CommandSetUpgrade in the orcpit.ini code. How all this works with map.ini I can't tell you unfortunately, as you will need an experiencelevel for the IsengardTent2 object, and it is important that the IsengardTent2 receives upgrades on level 2 and 3 so it can properly upgrade the CommandSet. I am so glad that I am modding BFME 1.
About the tree script I am not sure. Did you copy this over from BFME 1?
Edited by Echo, 27 October 2014 - 06:28 AM.
#7
Posted 27 October 2014 - 03:24 PM
Ok, I'm gonna try the code you gave me and see if it works. Thanks for your help^^. The problem is that by default, the tent is considered as a "decorative object", meaning it has a default health, is selectable and attackable. But nothing else. You can't even sell it and it doesn't have a building animations (meaning that it instantly show up if built)
About the tree control, yes, I took it from the Isengard Mission of BFME (not copy-paste, I just remade it by myself). It's located under the "Scripting" tab
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users