28. Mär 2024, 14:18 Hallo Gast.
Willkommen Gast. Bitte einloggen oder registrieren. Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge. Hierbei werden gemäß Datenschutzerklärung Benutzername und Passwort verschlüsselt für die gewählte Dauer in einem Cookie abgelegt.


Select Boards:
 
Language:
 


Autor Thema: Modifing the dwarven fortress  (Gelesen 2095 mal)

Leri_weill

  • Pförtner von Bree
  • *
  • Beiträge: 85
Modifing the dwarven fortress
« am: 26. Dez 2015, 17:33 »
Hello everybody !

This is my first post in the coding section and on this forum. I've been playing RoTWK for a long long time, but I never tried to code anything ingame.

I'm not really satisfied with the dwarven fortress that you summon with the final spell ; how can I change things ? I did read some posts in the section but they didn't give me a hint... It's hard being a newbie x)

What I would like to do is :
- connect the fortress to the mine network ;
- enable some upgrades (fire for catapults for example) ;
- if it's possible enable one upgrade that would allow the recruitement of heroes of the other dwarven realms ;

What file(s) do I have to edit to do that ?
I'm not even sure if I have to post this message in coding or modding section '^^

Thanks beforhand :)

Melkor Bauglir

  • Held von Helms Klamm
  • ***
  • Beiträge: 1.203
Re: Modifing the dwarven fortress
« Antwort #1 am: 26. Dez 2015, 19:28 »
Hello!
First of all, you need of course FinalBIG to open and change / create the correct files. When you got this, you can already start. ;) I would suggest to create your own .big-file, because otherwise you would overwrite the original data. Just in chase you did something wrong, so it doesn't destroy something.
Now you should search for the object DwarvenSummonedCitadelKe ep, in Edain this is inside the .ini data\ini\object\goodfaction\structures\dwarven\dwarvensummonedcitadel.ini

There you should be able to e.g. add this entry
    Behavior = TunnelContain ModuleTag_Contain
        ObjectStatusOfContained        = UNSELECTABLE ENCLOSED
        ContainMax                     = 5
        DamagePercentToUnits           = 0%
        PassengerFilter                = ANY +INFANTRY +BANNER +CAVALRY -MONSTER -SUMMONED -COMBO_HORDE -DwarvenBattleWagon -DwarvenBattleWagon_Eisenberge
        AllowEnemiesInside             = No
        AllowAlliesInside              = No
        AllowNeutralInside             = No
        AllowOwnPlayerInsideOverride   = Yes
        NumberOfExitPaths              = 1    // Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use            ExitStart01-nn/ExitEnd01-nn
        PassengerBonePrefix            = PassengerBone:ARROW_ KindOf:INFANTRY
        EntryPosition                  = X:0.0 Y:0.0 Z:0.0
        EntryOffset                    = X:80.0 Y:0.0 Z:0.0
        ExitOffset                     = X:100.0 Y:0.0 Z:0.0
        EnterSound                     = RuinedTowerEnterSound
        KillPassengersOnDeath          = No
        ShowPips                       = No
        ExitDelay                      = 0
    End
eventhough most offsets and positions are probably incorrect, because these belong to the mineshaft.
Also you probably have to add some entries in the CommandSet, otherwise the units shouldn't be able to exit.

And you probably have to remove this:
    Behavior = HordeGarrisonContain ModuleTag_hordeGarrison
         ObjectStatusOfContained    = UNSELECTABLE CAN_ATTACK ENCLOSED
         ContainMax              = 2
         DamagePercentToUnits    = 0%
         PassengerFilter        = GENERIC_FACTION_GARRISONABLE
         AllowEnemiesInside      = No         
         NumberOfExitPaths       = 1        // Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn         
         EntryPosition        = X:7.0 Y:-40.0 Z:0.0
        EntryOffset        = X:7.0 Y:-80.0 Z:0.0
        ExitOffset        = X:7.0 Y:-80.0 Z:0.0
        EnterSound        = RuinedTowerEnterSound
        KillPassengersOnDeath    = No
        ShowPips        = No       
    End
however this gives you the correct positions and offsets you need above.

Most of the time it's btw the best option to just search for something you know works the way you want something else to work (like the citadel to have a tunnel function) and use the working implementation as a help. Worst thing to happen is that the game crashes. xD


Greetings
Melkor Bauglir

Leri_weill

  • Pförtner von Bree
  • *
  • Beiträge: 85
Re: Modifing the dwarven fortress
« Antwort #2 am: 27. Dez 2015, 18:04 »
Thanks a lot for this fast answer. I did everything you told me to do, I'm gonna see if it works... or if the game crashes  xD

Any idea for my two other requests ? Do you think I could just copy/past code lines from other buildings for the upgrades ?

EDIT : by the way, is there a simple way to test what I do quickly, like spawn a fortress and being able to summon the fortress immediatly ? Do I have to use the world builder ? ^^

I read some tutorials. For the upgrades and heroes, do I have to changes things in Commandset.ini ?
« Letzte Änderung: 27. Dez 2015, 22:14 von CMG »

Leri_weill

  • Pförtner von Bree
  • *
  • Beiträge: 85
Re: Modifing the dwarven fortress
« Antwort #3 am: 27. Dez 2015, 22:53 »
One more message, sorry for the spam, this is the last one today :D
So, here is what I did change. I wanted the dwarven mines to be able to host 7 troops, so in dwarvenmineschaft.ini I did :

Behavior = TunnelContain ModuleTag_Contain
  ObjectStatusOfContained = UNSELECTABLE ENCLOSED
  ContainMax              = 7
  DamagePercentToUnits    = 0%
  PassengerFilter = ANY +INFANTRY +BANNER +CAVALRY -MONSTER -SUMMONED -COMBO_HORDE
  AllowEnemiesInside = No
AllowAlliesInside       = Yes
AllowNeutralInside = No
AllowOwnPlayerInsideOverride = Yes
  NumberOfExitPaths        = 1 // Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
PassengerBonePrefix      = PassengerBone:ARROW_ KindOf:INFANTRY
EntryPosition = X:0.0 Y:0.0 Z:0.0
EntryOffset = X:80.0 Y:0.0 Z:0.0
ExitOffset = X:100.0 Y:0.0 Z:0.0
EnterSound = RuinedTowerEnterSound
KillPassengersOnDeath = No
ShowPips = No
ExitDelay = 0
End

and in commandset.ini :

CommandSet DwarvenMineShaftCommandSet
1 = Command_ExitGarrison
2 = Command_ExitGarrison
3 = Command_ExitGarrison
4 = Command_ExitGarrison
5 = Command_ExitGarrison
6 = Command_ExitGarrison
7 = Command_ExitGarrison
8 = Command_Sell
End

I don't know if the game allows the changes I want. But in the end, it changed nothing at all  :-| What did I do wrong ?

For the fortress, in commandset.ini :

CommandSet DwarvenSummonedCitadelCommandSet
InitialVisible = 12
//Main Menu
; 1 = Command_ConstructDwarvenPorter
2    = Command_SelectRevivablesDwarvenFortress
3 = Command_FireWeaponMightyCatapult
4    = Command_SelectUpgradesDwarvenFortress
5 = Command_ExitGarrison
6 = Command_ExitGarrison
7 = Command_ExitGarrison
8 = Command_ExitGarrison
9 = Command_ExitGarrison
10 = Command_ExitGarrison
11 = Command_ExitGarrison
12 = Command_Sell

//Upgardes Menu
13 = Command_PurchaseUpgradeDwarvenFortressFlamingMunitions
14 = Command_PurchaseUpgradeDwarvenFortressDwarvenStonework
15 = Command_PurchaseUpgradeDwarvenFortressMightyCatapult
16 = Command_RadialBack

//Hero Menu
17 = Command_RingHeroReviveSlot // Note that we need an extra slot for the ring hero.
18 = Command_CreateAHeroReviveSlot // Note we also need an extra slot for the Create A Hero
19 = Command_GenericReviveSlot1 //Revives any hero. Use Slot1-Slot8 and keep them UNIQUE within the same commandset!
20 = Command_GenericReviveSlot2
21 = Command_GenericReviveSlot3
22 = Command_GenericReviveSlot4
23 = Command_GenericReviveSlot5
24 = Command_GenericReviveSlot6
25 = Command_GenericReviveSlot7
26 = Command_RadialBack
End


and in dwarvensummonedcitadel.i ni, I tried to make the citadel gain ressouces :

Behavior = TerrainResourceBehavior ModuleTag_NewMoneyDeadSpot
Radius = 150 // How far we try to claim ground
MaxIncome = 25 // If we were to get all we wanted, how much we would earn.  Linear slope to 0 at 0% claim
IncomeInterval = 7000 // How often (in msec) we give that much money
HighPriority = Yes // A high priority claim gets to pretend it was there first.
End

and then :

Behavior = TunnelContain ModuleTag_Contain
  ObjectStatusOfContained = UNSELECTABLE ENCLOSED
  ContainMax              = 7
  DamagePercentToUnits    = 0%
  PassengerFilter = ANY +INFANTRY +BANNER +CAVALRY -MONSTER -SUMMONED -COMBO_HORDE
  AllowEnemiesInside = No
AllowAlliesInside       = Yes
AllowNeutralInside = No
AllowOwnPlayerInsideOverride = Yes
  NumberOfExitPaths        = 1 // Defaults to 1.  Set 0 to not use ExitStart/ExitEnd, set higher than 1 to use ExitStart01-nn/ExitEnd01-nn
PassengerBonePrefix      = PassengerBone:ARROW_ KindOf:INFANTRY
EntryPosition = X:0.0 Y:0.0 Z:0.0
EntryOffset = X:80.0 Y:0.0 Z:0.0
ExitOffset = X:100.0 Y:0.0 Z:0.0
EnterSound = RuinedTowerEnterSound
KillPassengersOnDeath = No
ShowPips = No
ExitDelay = 0
End

as for the mines. How should I change the code to make the heroes of the three dwarven realms available ?

I have copied/pasted the original ini.big in a safe place and I did those changes in the ini.big file which is in the RoTWK folder. I saved every change I did in FinalBIG but it seems that nothing changed... What did I do wrong ? :@