A few quick modding questions
#1
Posted 15 March 2010 - 02:16 AM
I've been out for a while, but as mentioned in another post I've started modding again.
Here are a few basic questions I have so far.
I will try to post updates as some more issues come up. I have a tentative list, but here are the things I'm working on now.
How to:
- Take away feature that reduces farm income based on how many farms you have.
- Change farm radius to 0.
- Have spells usable even when base destroyed (like bfme 1).
- Have upgrades usable even when armory destroyed (like bfme 1).
- Change population limit to a constant population (say 500 constant).
- This one a bit tough : How to make rubble when building destroyed (so it is rebuildable with purchased upgrades... like a base destroyed and rebuildable from rubble with all upgrades kept that were purchased for that base).
Answer what you can anyone. Even if you know only one, or want to elaborate on what someone said.
All help is appreciated!
#2
Posted 15 March 2010 - 06:36 AM
- Change farm radius to 0.
Both of these are caused by the radius... so just find this piece of code:
Behavior = TerrainResourceBehavior ModuleTag_NewMoney Radius = GENERIC_RESOURCE_STRUCTURE_MONEY_RANGE ; How far we try to claim ground MaxIncome = GENERIC_RESOURCE_STRUCTURE_MONEY_AMOUNT ; If we were to get all we wanted, how much we would earn. Linear slope to 0 at 0% claim IncomeInterval = GENERIC_RESOURCE_STRUCTURE_MONEY_TIME ; How often (in msec) we give that much money Upgrade = Upgrade_MarketplaceUpgradeGrandHarvest UpgradeBonusPercent = GONDOR_GRANDHARVEST_PRODUCTION_INCREASE % UpgradeMustBePresent = ANY +GondorMarketPlace Endand change it to:
Behavior = TerrainResourceBehavior ModuleTag_NewMoney Radius = 0 ; How far we try to claim ground MaxIncome = GENERIC_RESOURCE_STRUCTURE_MONEY_AMOUNT ; If we were to get all we wanted, how much we would earn. Linear slope to 0 at 0% claim IncomeInterval = GENERIC_RESOURCE_STRUCTURE_MONEY_TIME ; How often (in msec) we give that much money Upgrade = Upgrade_MarketplaceUpgradeGrandHarvest UpgradeBonusPercent = GONDOR_GRANDHARVEST_PRODUCTION_INCREASE % UpgradeMustBePresent = ANY +GondorMarketPlace End
Or do it the longer way... change the type of module to something like this one:
Behavior = AutoDepositUpdate AutoDepositModuleTag DepositTiming = GONDOR_FARM_MONEY_TIME ; in milliseconds DepositAmount = GONDOR_FARM_MONEY_AMOUNT ; cash amount to deposit every DepositTiming InitialCaptureBonus = 0 ; no initial bonus Upgrade = Upgrade_MarketplaceUpgradeGrandHarvest UpgradeBonusPercent = GONDOR_GRANDHARVEST_PRODUCTION_INCREASE % UpgradeMustBePresent = ANY +GondorMarketPlace End
- Have spells usable even when base destroyed (like bfme 1).
Go to system.ini.... (\data\ini\object\system)
and change:
#define SPELL_BOOK_REQUIREMENTS_FILTER NONE +COMMANDCENTER -FS_BASE_DEFENSE ; ;
#define SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC NONE
to something like:
#define SPELL_BOOK_REQUIREMENTS_FILTER ANY
#define SPELL_BOOK_REQUIREMENTS_FILTER_STRATEGIC NONE
- Have upgrades usable even when armory destroyed (like bfme 1).
Go to upgrade.ini
RequiredObjectFilter = NONE +DwarvenSiegeWorks
remove all of those kinds of pieces of code...
- Change population limit to a constant population (say 500 constant).
Change the values in gamedata.ini (cant save it as gamedata.ini in the original place though, you will need to move it into the object folder!)
;;; COMMAND POINTS FOR MULTIPLAY;;; GoodCommandPointsMP2 = 100 1000 ; 2 players EvilCommandPointsMP2 = 100 1000 GoodCommandPointsMP3 = 100 875 ; 3 players EvilCommandPointsMP3 = 100 875 GoodCommandPointsMP4 = 100 750 ; 4 players EvilCommandPointsMP4 = 100 750 GoodCommandPointsMP5 = 100 675 ; 5 players EvilCommandPointsMP5 = 100 675 GoodCommandPointsMP6 = 100 625 ; 6 players EvilCommandPointsMP6 = 100 625 GoodCommandPointsMP7 = 100 575 ; 7 players EvilCommandPointsMP7 = 100 575 GoodCommandPointsMP8 = 100 500 ; 8 players EvilCommandPointsMP8 = 100 500
Rubble is easy...
give it:
Behavior = KeepObjectDie ModuleTag_IWantRubble End Behavior = RebuildHoleExposeDie ModuleTag_ExposeDie ExemptStatus = SOLD HoleName = WildMineShaftHole HoleMaxHealth = 500.0 FadeInTimeSeconds = 2.0 End
Then create a hole....
Object WildStructureHole ; *** ART Parameters *** SelectPortrait =; SUHole_L ButtonImage = SUHole_L Draw = W3DScriptedModelDraw ModuleTag_Draw OkToChangeModelColor = Yes DefaultModelConditionState Model = GBGENRUBBLE End End ; ***DESIGN parameters *** DisplayName = OBJECT:WildStructureHole Side = Wild EditorSorting = SYSTEM PlacementViewAngle = 0 BuildCost = 100 BuildTime = 10.0 ; in seconds VisionRange = 50.0 ; Shroud clearing distance ShroudClearingRange = 50 CommandSet = SellableCommandSet ArmorSet Conditions = None Armor = StructureArmor End ; *** AUDIO Parameters *** #include "..\..\..\Includes\StandardBuildingEvaEvents.inc" CampnessValue = CAMPNESS_RESOURCE_REBUILD_HOLE ; *** ENGINEERING Parameters *** RadarPriority = STRUCTURE KindOf = PRELOAD STRUCTURE SELECTABLE IMMOBILE REBUILD_HOLE CAN_SEE_THROUGH_STRUCTURE FS_TECHNOLOGY NOT_AUTOACQUIRABLE UNATTACKABLE Body = StructureBody ModuleTag_Body ; To set the health for a particular hole, edit the entry in the object ; that will leave the hole behind (edit the RebuildHoleExposeDie entry) MaxHealth = 9999999.9 ;bigger than anything realistic we use InitialHealth = 9999999.9 ;bigger than anything realistic we use End Behavior = RebuildHoleBehavior ModuleTag_RebuildHole WorkerObjectName = MordorWorkerNoSelect WorkerRespawnDelay = 120000;in milliseconds HoleHealthRegen%PerSecond = 0.5% ;regen this % of HoleMaxHealth per second End Behavior = SlowDeathBehavior ModuleTag_Die SinkDelay = 0 SinkRate = 4.8 // in Dist/Sec DestructionDelay = 4000 Sound = INITIAL BuildingRubbleSink End Geometry = CYLINDER GeometryMajorRadius = 25.0 GeometryHeight = 5.0 GeometryIsSmall = No Shadow = SHADOW_VOLUME BuildCompletion = PLACED_BY_PLAYER End
At least thats what i think you wanted...
#3
Posted 15 March 2010 - 07:08 AM
I already started work on this.
Looking at the rest now.
Thanks a bunch.
#4
Posted 15 March 2010 - 07:37 AM
For the object i put the hole in (Men_Fortress or w/e), how do i tell which hole object i want to reference.
In the example you had
HoleName = WildMineShaftHole
and then you have object
Object WildStructureHole
Shouldn't the Object and the HoleName be the same? Or else how will the code know which hole to reference?
#5
Posted 15 March 2010 - 06:36 PM
#6
Posted 28 March 2010 - 04:41 AM
I am still having problem with the rubble thing.
Let me explain exactly what I am trying to do.
I am working on the buildplot bases in RJ_ROTWK mod.
The castle bases are similar to the bfme 1 bases EXCEPT the base in the middle is the men bfme 2 fortress instead of the gondor citadel.
I am trying to make it so when the center fortress is destroyed, it works similar to the citadel that is destroyed; there is a plot on the ground that one can click to rebuild the base.
I add the code:
Behavior = KeepObjectDie ModuleTag_IWantRubble End
but when I go in game and sell the base, it is simply gone. There is no buildplot "rubble" or whatever it is to rebuy the base. I looked at gondor's citadel code and compared it with men fortress code.
Other than the above code, I can't seem to find any difference.
Can anyone help?
Thanks.
Object MenFortressCitadel
Object GondorCastleBaseKeep
#7
Posted 28 March 2010 - 09:57 AM
#8
Posted 28 March 2010 - 02:05 PM
What I want to know - if a Lair is in a rubble state, then starts rebuilding, and is destroyed while rebuilding, how can we make it then spawn chests or spawn more rubble? At the moment if you destroy a lair while it is rebuilding you lose the treasure.
Ridder didn't mention how to solve this. That is controlled per faction in playertemplate.ini by these lines:- Take away feature that reduces farm income based on how many farms you have.
ResourceModifierValues = 100 100 100 100 90 85 80 75 71 68 66The first number is the % of maximum resources you gain when you have 0 farms, the second is for 1 farm, etc. So if I have four Farms on the map, all built at 100% value (which yours all will be if they have 0 radius), then I am getting 90% resources from those Farms.
My recommendation is to remove everything from the objectfilter at the top of the file to see if that breaks the link between the ResourceModifierValues line and the resource buildings:
#define RESOURCE_MODIFIER_OBJECT_FILTER ANY +GondorFarm +GondorFarmMultiplayer +DwarvenMineShaft +ElvenMallornTree +IsengardFurnace +IsengardLumberMill +MordorLumberMill +MordorSlaughterHouse +WildMineShaft +AngmarMill +ArnorFarm +ArnorFarmMultiplayer;;,;; Added Arnor Farmsto say
#define RESOURCE_MODIFIER_OBJECT_FILTER NONEAlternatively if that doesn't work you can try messing with the values themselves, but I think there is a hardcoded decline after the array runs out so you might want to just try adding 50 '100's or so to avoid that problem.
Edited by Prolong, 28 March 2010 - 02:07 PM.
#9
Posted 29 March 2010 - 05:17 AM
So just to clarify, I just need to put this piece of code
Behavior = KeepObjectDie ModuleTag_IWantRubble End
in the Fortress object code and it should work? The fortress should have clickable rubble to rebuild?
#10
Posted 29 March 2010 - 05:25 AM
And your W3D should have a rubble state of course!
#11
Posted 29 March 2010 - 05:35 AM
ModelConditionState = RUBBLE Model = GBFortress_D3 End AnimationState = RUBBLE Animation = Fortress_Rubble AnimationName = GBFortress_D3SK.GBFortress_D3AN AnimationMode = ONCE End EnteringStateFX = FX_FortressCollapse End
I just tried it, and I had nothing.
Once the base is destroyed, there is nothing left underneath.
It is simply gone.
Any suggestions?
#12
Posted 29 March 2010 - 01:21 PM
Or... Better yet... Helms deep keep, you can rebuild it
what it has is:
ModelConditionState = RUBBLE Model = RBHDArcade_D4 ParticleSysBone OBJECT05 FireBuildingLarge ParticleSysBone OBJECT05 SmokeBuildingLarge End AnimationState = RUBBLE Animation = RubbleAnimation AnimationName = RBHDArcade_D4.RBHDArcade_D4 AnimationMode = ONCE End EnteringStateFX = FX_MinWallATransitionReallyDamaged Endand...
KeepSelectableWhenDead = Yes //.......... ; Note that structures with "RUBBLE" states should not use DestroyDie; such buildings are ; never truly destroyed, even when reduced to zero health. Also note that garrisonable ; buildings automatically stick around because GarrisonContain has it's own DieModule Behavior = KeepObjectDie ModuleTag_IWantRubble End
What does ur model look like? rubble?
or nothing?
Edited by Ridder Geel, 29 March 2010 - 01:26 PM.
#13
Posted 03 April 2010 - 12:43 AM
I've looked at a few things.
Im still not sure what to do.
Here is what I have so far.
I added the following code:
Behavior = KeepObjectDie ModuleTag_IWantRubble End
KeepSelectableWhenDead = Yes
Behavior = StructureCollapseUpdate ModuleTag_08 MinCollapseDelay = 000 MaxCollapseDelay = 000 CollapseDamping = .5 MaxShudder = 0.6 MinBurstDelay = 250 MaxBurstDelay = 800 BigBurstFrequency = 4 FXList = INITIAL FX_FortressCollapse ;FXList = ALMOST_FINAL FX_FortressCollapse [b] DestroyObjectWhenDone = No;Yes[/b] CollapseHeight = 155 End
I looked at the rubble, but didn't change anything.
I am not sure what to change at this point.
If someone knows how to do this or can take a bit of time to find it out if you know what your doing, please do so.
When I play the game and the base is destroyed, I can select the base, whose rubble seems to be nothing.
When I select, it give me the fortress menu. When I select the hero button, I can't build any heroes; only return. But I can select and purchase the upgrades.
I think this is because of DestroyObjectWhenDone= No.
Thanks.
#14
Posted 11 April 2010 - 03:30 AM
I made some progress.
I looked at the original bfme base center and compared it with the fortress one.
The base center (the keep) has a rebuild command in the commandset.
I added the rebuild command
Command_StartCitadelSelfRepairto the fortress's commandset.
However when I play the game and the base is destroyed and I try to rebuild, I click rebuild and nothing happens; I just lose the gold that it cost to rebuild.
Does anyone know why this happens?
I am thinking one possibility might be a geometry problem, but I simply dont have enough knowledge about geometries.
Any help is appreciated.
Thanks
#15
Posted 11 April 2010 - 09:59 PM
Behavior = GettingBuiltBehavior GetBuiltBehaviorTag SelfBuildingLoop = BuildingConstructionLoop ; Only played if we DON'T spawn a worker SelfRepairFromDamageLoop = NoSound ; This doesn't cause an animation, so don't bother playing a sound SelfRepairFromRubbleLoop = BuildingConstructionLoop SpawnTimer = -1.0 ; Negative means no 'autoheal' RebuildTimeSeconds = 120 Endcheck for similar codes... if you dont have... Make
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users