Modding Union

[en] - Modding Corner => Coding => Thema gestartet von: Leri_weill am 29. Mär 2016, 14:34

Titel: Leri_weill's coding thread
Beitrag von: Leri_weill am 29. Mär 2016, 14:34
Hello Modding Union !

I already posted a message a while ago but now I will just creat a thread for my modding questions. I don't wanna invade the forum :c

My two first questions will be very nooby and basic ones !

I did read a few tutorials but I wanna be sure about how I have to work. First, if I want the modifications in Edain Mod to take effect, I have to use the __edain_data.big file, right ?

And second question, when I open the file with FinalBig, I used to edit files directly in the .big file. It didn't seem stupid to me because the modifications in the different .ini files seemed to stay and be taken into account. But since nothing changed ingame even by copying-pasting codes of the tutorials, I had to think about it twice. What is the difference between doing that and extracting the .ini and modifying it ? Is it compulsory to extract the .ini file you are working on ?
Titel: Re: Leri_weill's coding thread
Beitrag von: Leri_weill am 29. Mär 2016, 19:33
By the way, I'm gonna ask my first real modding question : in which .ini do I have to look to modifiy the number of powers required for a spell ? I want to modifiy the number for the Dwarven Fortress.
Titel: Re: Leri_weill's coding thread
Beitrag von: Melkor Bauglir am 29. Mär 2016, 21:50
It's the science.ini.
(However there you will find exclusively the spells' costs and spells to buy in order to unlock them, their order needs to be changed in the commandset.inc and most of the stuff they actually do separeted over at least three files (don't remember their names by heart ;)). Good luck!

Greetings
Melkor Bauglir
Titel: Re: Leri_weill's coding thread
Beitrag von: Prinz von Dol Amroth am 30. Mär 2016, 13:35
Zitat
I did read a few tutorials but I wanna be sure about how I have to work. First, if I want the modifications in Edain Mod to take effect, I have to use the __edain_data.big file, right ?
Yes
Zitat
What is the difference between doing that and extracting the .ini and modifying it ? Is it compulsory to extract the .ini file you are working on ?
There is normally no difference between modifying directly in FinalBig (+ Edit with Editor) and extracting the files, except for the data\ini\default\skirmishaidata.ini.

There are several explanations for your problem:
Titel: Re: Leri_weill's coding thread
Beitrag von: Leri_weill am 30. Mär 2016, 17:04
Thanks for your hint Melkor :)

Here's my file list, nothing's hidden ^^
I'm editing the __edain_data.big file (I saved the original in an other folder).
(http://img15.hostingpics.net/pics/435083Capture.png)

Titel: Re: Leri_weill's coding thread
Beitrag von: Leri_weill am 30. Mär 2016, 17:22
So, I found the line in the science.ini file :

Science SCIENCE_Citadel
  PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_DWARVES SCIENCE_Durinstag OR SCIENCE_DWARVES SCIENCE_Todestrotz
  SciencePurchasePointCost = GOOD_RANK_4_COST
  SciencePurchasePointCostMP = 13
  IsGrantable = Yes
End

But of course it doesn't change anything because of the beginning :
#define GOOD_RANK_1_COST    1
#define GOOD_RANK_2_COST    3
#define GOOD_RANK_3_COST    6
#define GOOD_RANK_4_COST    10

Can't I define another rank or will it destroy everything ? :D
Titel: Re: Leri_weill's coding thread
Beitrag von: Leri_weill am 10. Apr 2016, 22:05
Alright, one little question : what's the code that makes a building heal allied units ? Or is this harder to implement than just copy/pasting some code lines ?  :o
Titel: Re: Leri_weill's coding thread
Beitrag von: Ealendril der Dunkle am 11. Apr 2016, 11:38
Just edit the following code and everything will be fine:
SciencePurchasePointCostMP = 13 ;<- change the number.

Thats the code for heal and banner respawn:
    Behavior = PassiveAreaEffectBehavior ModuleTag_SplashOfHealingWater_Ahh
        EffectRadius          = GONDOR_WELL_AOE_RADIUS
        PingDelay             = 3000
        HealPercentPerSecond  = WELL_HEAL_PERCENT
        AllowFilter           = ANY +INFANTRY +CAVALRY -MACHINE -IMMOBILE +DOZER
        NonStackable          = Yes
        HealFX                = FX_SpellHealUnitHealBuff
    End


    ;/////////////////////////////////////////////////////////
    ;// BannerCarrierUpdate module for Well Object
    ;/////////////////////////////////////////////////////////
    Behavior = BannerCarrierUpdate BannerCarrierUpdateModuleTag
        IdleSpawnRate            = WELL_SPAWN_RATE   
        UnitSpawnFX              = FX_BannerCarrierSpawnUnit        ; name of particle FX to use when the BannerCarrier spawns a new unit       
        ReplenishNearbyHorde     = Yes
        ReplenishAllNearbyHordes = No
        ScanHordeDistance        = GONDOR_WELL_AOE_RADIUS
    End
Titel: Re: Leri_weill's coding thread
Beitrag von: Leri_weill am 11. Apr 2016, 17:45
So my code is now :
Science SCIENCE_Citadel
  PrerequisiteSciences = SCIENCE_GOOD OR SCIENCE_DWARVES SCIENCE_Durinstag OR SCIENCE_DWARVES SCIENCE_Todestrotz
  SciencePurchasePointCost = 13
  SciencePurchasePointCostMP = 13
  IsGrantable = Yes
End

I did save the __edain_data.big file in the RotWK folder but it seems that the changes won't apply anyway. My career as a modder isn't about to start yet  [uglybunti]
Titel: Re: Leri_weill's coding thread
Beitrag von: Prinz von Dol Amroth am 11. Apr 2016, 17:55
If you modify Bigs directly in the RotWK folder, there could occur complications.

Open your User\AppData\Local\VirtualStore\...\RotWk folder and delete all .big files.
Titel: Re: Leri_weill's coding thread
Beitrag von: Leri_weill am 11. Apr 2016, 19:01
OOOOOOOOOOOOOOOOOOOOOOOK AY, that's the reason why nothing would change ? The file I should use to mod is the .big in the Virtual Store ? ^^And rather let the .big in the RotWK folder untouched ? Or just suppress the file in the Virtual store ?

I really feel stupid right now hahaha
Titel: Re: Leri_weill's coding thread
Beitrag von: Prinz von Dol Amroth am 11. Apr 2016, 19:14
The file you should modify is the normal edain_data.big in RotWK folder. But you shouldn't modify this file directly. You should create a copy in your Modding folder, and modify this copy. If you rename your copy and add "____" in front of the name, you can keep the original edain_data.big, but you have also your changes.
After modding, you insert your copy in the RotWK folder.

Having .big files in your Virtual Store folder, are these complications. You have to delete all .big files there.
Titel: Re: Leri_weill's coding thread
Beitrag von: Leri_weill am 11. Apr 2016, 20:14
I created a copy and named it as you told me. Now let see if it works!

Btw thanks for beeing so patient with me  xD