Where to begin?
#21
Posted 21 December 2008 - 03:09 PM
Guess I'm saying gamedata.ini is pretty much the last thing on your priority list. Great tool for testing, though.
Anyway... regarding your question:
Check the heroes' individual file. They probably don't use the # define gamedata reference anymore. These files are found in data/ini/object/goodfaction/units/gondor, data/ini/object/units/rohan or data/ini/object/evilfaction/evilfactionunits.
Then just CTRL-F Buildcost and punch in the value manually. Alternatively, you can add a reference like GANDALF_BUILDCOST_NEW and then drop the reference #define GANDALF_BUILDCOST_NEW at the top of the .ini file. Or in gamedata.ini. Whatever suits you best, really.
Saruman, Lurtz & the Nazguls are somewhere in the evilfactionunits files. Said file is specifically annoying to mod since they put everything together rather than divide its content.
As a bonus, here's a preemptive answer to a question you'll no doubt have. If you wanna add special powers/attributes to units, here's the files you'll most likely have to mod.
Attributemodifer
CommandButton
CommandSet
Experiencelevels
Specialpower
Upgrade
Weapon
*Unit file*
#22
Posted 21 December 2008 - 03:13 PM
#23
Posted 21 December 2008 - 03:14 PM
Mod progress so far - I've tested this and it all works -
- Fixed it so that Aragorn, Gandalf and Saruman start at Lvl.1 so that you can earn their powers instead of just having them
- Added Frodo to Rohan and Sam and Aragorn to Gondor. I might just move all four hobbits to Rohan to compensate for Aragorn.
- Reworked spellbook so that Gondor has Anduril instead of Elven Allies and Rohan has Rohan Allies instead of Anduril. The whole thing works fine.
What I want to do next - please tell me how to do this -
- Change starting resources to 1500. I did this in the gamedata folder, but for some reason it doesn't change the game. Is there something else I need to do?
- Give Frodo and Sam a build cost and a build time. Do I just write one in the gamedata folder, like...
#define FrodoBuildcost 350And if so, how exactly should I write this?
- Change Gandalf's starting cost to 3500, change Aragorn's starting cost to 2500, change Saruman's starting cost to 3500 (To match with starting at Lvl.1). I did this in the gamedata folder (by editing the heroes' buildcosts), but for some reason it doesn't change the game. Is there something else I need to do?
- Change Eowyn, Boromir and Faramir's stats to make their attacks faster. How do I do this?
Thanks to everyone who is helping with this. If this ever gets larger, you'll get a mention in the credits.
EDIT: Thanks there Darth, I didn't notice that since you posted it while I was posting. I'll have a look.
Edited by Hasfusel, 21 December 2008 - 03:21 PM.
#24
Posted 21 December 2008 - 03:20 PM
Alternatively, you can add a reference like GANDALF_BUILDCOST_NEW and then drop the reference #define GANDALF_BUILDCOST_NEW at the top of the .ini file. Or in gamedata.ini. Whatever suits you best, really.
I don't get that, though. What's a reference? And would it work with that exact text?
Edited by Hasfusel, 21 December 2008 - 03:20 PM.
#25
Posted 21 December 2008 - 03:29 PM
Body = RespawnBody ModuleTag_RespawnBody CheerRadius = EMOTION_CHEER_RADIUS ;is actually 350 (see below) MaxHealth = BOROMIR_HEALTH PermanentlyKilledByFilter = NONE DodgePercent = HERO_DODGE_PERCENT End
You find the actual values of the used MACROS in gamedata.ini (sometimes elsewhere)
;------------------------GENERIC UNITS/STRUCTURES----------
#define SENTRY_TOWER_COST 150
...
#define EMOTION_CHEER_RADIUS 350
...
...
;-----------------------Boromir------------------
#define BOROMIR_BUILDCOST 1600 ; 1400
#define BOROMIR_BUILDTIME 30
#define BOROMIR_HEALTH 1400
...
etc.
Axed Head and A.I. Coder for S.E.E. and ... stuff
".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."
#26
Posted 21 December 2008 - 03:31 PM
Alternatively, you can add a reference like GANDALF_BUILDCOST_NEW and then drop the reference #define GANDALF_BUILDCOST_NEW at the top of the .ini file. Or in gamedata.ini. Whatever suits you best, really.
I don't get that, though. What's a reference? And would it work with that exact text?
1 - Just about everything with an # is a reference.
Gamedata doesn't do anything unless there is a matching #entry somewhere else.
Let's say I add this to gamedata
#define GIMLI_ADVANCEDTHROW_DAMAGE 500
It won't do a single thing unless there is an exact match in the weapon.ini file.
2 - Yes, it should work with that text. Hell, it would work with this too
# define GANDALF_MWAHAHAHAHA 500
BuildCost = GANDALF_MWAHAHAHAHA
That would work fine too. Just picked something similar to everything else, lol.
Just keep in mind that if you put the # ref in the unit file, it has to be at the top before the Object WhateverUnit. Gamedata works too, obviously.
Edited by DarthCyclopsRLZ, 21 December 2008 - 03:32 PM.
#27
Posted 21 December 2008 - 03:59 PM
Here is Boromirs sword code:
[codebox];------------------------------------------------------------------------------
Weapon BoromirSword
LeechRangeWeapon = Yes
AttackRange = 30.0
MeleeWeapon = Yes
DelayBetweenShots = 766 ; time between shots, msec
PreAttackDelay = 733 ; 400 is sword swing delay time before contact with target.
PreAttackType = PER_SHOT ; Do the delay each time we attack a new target
FireFX = FX_GondorSwordHit
FiringDuration = 866 ; Duration of the sword swing
RadiusDamageAffects = ENEMIES NEUTRALS ;
DamageNugget ; A basic Nugget that just does damage
Damage = BOROMIR_DAMAGE
Radius = 0
; DamageArc = 180 ;
DelayTime = 0
DamageType = HERO
DamageFXType = SWORD_SLASH
DeathType = NORMAL
End
;
MetaImpactNugget ; A Nugget that throws things back with force
HeroResist = .85
ShockWaveAmount = 25.0 ;10.0
ShockWaveRadius = 8
ShockWaveArc = 120
ShockWaveTaperOff = 1
End
End[/codebox]
Now that you've found the code, all you need to do is change the Delay Between Shots to any number you want. This will make him attack faster. If you want the slash itself to speed up, just change the PreAttackDelay value to any number you want.
--------------------------------------------------------------------------------------------------------------------
#28
Posted 21 December 2008 - 04:05 PM
#29
Posted 21 December 2008 - 04:26 PM
- Change starting resources to 1500. I did this in the gamedata folder, but for some reason it doesn't change the game. Is there something else I need to do?
playertemplate.ini
Look for StartMoney.
- Give Frodo and Sam a build cost and a build time. Do I just write one in the gamedata folder, like...
No.
For the sake of simplicity and later retrieval, put this in the Design Parameters of their respective .ini files.
BuildCost = FRODO_BUILDCOST BuildTime = FRODO_BUILDTIME
You'll then need to put these # references somewhere. Either top of the unit file or gamedata.
#define FRODO_BUILDCOST 375 #define FRODO_BUILDTIME 30
Without the references, this could look like this:
BuildCost = 375 BuildTime = 30
Edited by DarthCyclopsRLZ, 21 December 2008 - 04:28 PM.
#30
Posted 21 December 2008 - 04:42 PM
In Gandalf's .ini file, it says,
BuildCost = Gandalf_The_White_BuildCost
Are you saying that I should change it to look like this
#define BuildCost = 3500
or this
BuildCost = GANDALF_BUILDCOST_NEW
and then write
#define GANDALF_BUILDCOST_NEW 3500
in the gamedata folder?
And by "top of the unit file" do you mean before the title itself? What do you mean?
Edited by Hasfusel, 21 December 2008 - 04:58 PM.
#31
Posted 21 December 2008 - 04:54 PM
Axed Head and A.I. Coder for S.E.E. and ... stuff
".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."
#32
Posted 21 December 2008 - 05:03 PM
#define BuildCost = 3500
or this
BuildCost = GANDALF_BUILDCOST_NEW.
And will I need to write
#define GANDALF_BUILDCOST_NEW 3500in the gamedata folder both ways, or just the second?
Also, what is meant by "top of the unit file"? Do you mean Frodo.ini? And do you then mean that I should write it right at the very top, before the title?
This is rather confusing...
#33
Posted 21 December 2008 - 05:12 PM
Until you understand how they work forget about the 'top of the file'-thing.
Axed Head and A.I. Coder for S.E.E. and ... stuff
".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."
#34
Posted 21 December 2008 - 06:34 PM
Basically the game is saying 'BuildCost = X". X is your variable, and variables are defined in gamedata.ini. You don't, however, need to use a variable if you don't want. So you can put a whole number instead of X, or name your variable almost anything you want. Here's an example:
If you want to define the buildcost as a 3500, just go to the design parameters of Gandalf's ini file and find the line BuildCost line. Replace "Gandalf_The_White_BuildCost" with "3500"
If you want to use a variable (usually it's best for organization purposes, so that you can define all variables in the same place in order to tweak things for balance at a later time), then make sure the variable is in all capital letters and with no spaces, such as "GANDALF_BUILDCOST_NEW". Now you go into the gamedata.ini and go to the very bottom of the file, and put the following in: "#define GANDALF_BUILDCOST_NEW 3500" You see, using GANDALF_BUILDCOST_NEW is exactly the same as using a variable in a mathematic equation. So, there you have it. I hope that helps.
-Jimmy
#35
Posted 22 December 2008 - 11:25 AM
I think I tried doing it the other way, but when I started the game it said, "GAME CRASH", so I gave up and did it the other way.
It's going well at the moment. I've so far added Gwaihir, Aragorn, Frodo and Sam to Gondor, with Aragorn priced at 2250, Gandalf priced at 2750 (that's just for experimental purposes, I'll make him more expensive later on). Gwaihir seemed to be pretty complete, so I gave him a price of something like 6500 and stuck him in. Once I can find a skinner/modeller, I'll try for some work on Gamling to balance Rohan off.
To Mordor I added an extra Fell Beast, and Sauron too. He currently has no levels or powers, and to get rid of that irritating pink blob where his icon should be I replaced his icon with that of the Eye of Sauron (HIEyeOfSauron). I tried adding Gothmog, but I gave up when I realised that his animations didn't work and he just kind of hovered around without moving arms or legs crushing things (anyone here remember Crazy Frog? Ah, never mind...) and then smacking them with his invisible mace. He had something like ten health points, too, and I didn't know how to change any of that.
Does anyone know how to give Sauron (and Gollum, while we're at it) levels? I'd like Sauron to start at Lvl.10, though, and Gollum to start at Lvl.1 and be able to work his way up. I'd like to give Sauron a power, like Word of Power maybem and I'd also like to remove Gollum's commandset, and give him
a) the same health and attack of a hobbit, say, Frodo because they're supposed to be roughly the same strength. This will allow him to have a chance to level up.
b) a slightly higher price
b) a power (at Lvl.10, I want him to have a reward for getting so far... some sort of Assassinate Hero-type ability? heh heh)... I have no idea how to make powers, though.
If anyone knows how to do this, please explain.
Thank all of you for all the help you've given me. I'm really happy with this now.
#36
Posted 22 December 2008 - 12:05 PM
Adding a New Hero
Weapons & Weaponsets
and
Articles on modding
Please read. Then experiment. Fail and succeed.
Another very nice feature is this one: CLICK ME
There is a lot you can find out on your own. That's a part of modding. Try it. You can always come back later with questions that are more difficult to answer. You might now say 'Why don't you just answer my question?'. And i answer 'It won't help you in the long run, unless you always want somebody to supervise what you are doing'.
The tutorials and archives are there for a reason. Your questions have been asked (and answered) a million times. And i think a browsed the complete archive at least twice, looking for questions i never asked.
Axed Head and A.I. Coder for S.E.E. and ... stuff
".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."
#37
Posted 22 December 2008 - 04:00 PM
I worked out a little myself, which was fun. I worked out how to edit the science trees, for one thing. Not adding new powers, but I moved them round and gave them slightly higher prices so that you can't unlock them all early into the game, and so that you're still earning new ones as the game progresses.
EDIT: Well, I can't really use them since they require copying and pasting from the tutorial, and I have no internet on my computer (I have to do all my internet on my parents' computer).
EDIT EDIT: I guess I'll try copypasting into a Word Document, then putting that on a memory stick. Hey, croquet.
Edited by Hasfusel, 22 December 2008 - 06:37 PM.
#38
Posted 23 December 2008 - 05:36 PM
Does anyone know how to allow Gollum to level up? I copy pasted Frodo's ExperienceLevels data over his ExperienceLevels data and then renamed it all appropriately, but he still doesn't have a level. Does anyone know how to fix this?
#39
Posted 23 December 2008 - 05:45 PM
#40
Posted 23 December 2008 - 08:27 PM
Your code should be similar to this:
ExperienceLevel NeutralGollumLevel1
TargetNames = NeutralGollum
RequiredExperience = 1
ExperienceAward = HOBBIT_LVL1_EXP_AWARD
Rank = 1
Upgrades = Upgrade_HeroLV1Ability
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
END
ExperienceLevel NeutralGollumLevel2
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL2_EXP_NEEDED
ExperienceAward = HOBBIT_LVL2_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 2
Upgrades = Upgrade_HeroLV2Ability
AttributeModifiers = HobbitLevelUpDamage1
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
ExperienceLevel NeutralGollumLevel3
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL3_EXP_NEEDED
ExperienceAward = HOBBIT_LVL3_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 3
Upgrades = Upgrade_HeroLV3Ability
AttributeModifiers = HobbitLevelUpDamage2
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
ExperienceLevel NeutralGollumLevel4
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL4_EXP_NEEDED
ExperienceAward = HOBBIT_LVL4_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 4
Upgrades = Upgrade_HeroLV4Ability
AttributeModifiers = HobbitLevelUpDamage3
;Upgrades = Upgrade_HeroRadiateFear
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
ExperienceLevel NeutralGollumLevel5
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL5_EXP_NEEDED
ExperienceAward = HOBBIT_LVL5_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 5
Upgrades = Upgrade_HeroLV5Ability
AttributeModifiers = HobbitLevelUpDamage4
Upgrades = Upgrade_ElvenCloak
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
ExperienceLevel NeutralGollumLevel6
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL6_EXP_NEEDED
ExperienceAward = HOBBIT_LVL6_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 6
Upgrades = Upgrade_HeroLV6Ability
AttributeModifiers = HobbitLevelUpDamage5
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
ExperienceLevel NeutralGollumLevel7
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL7_EXP_NEEDED
ExperienceAward = HOBBIT_LVL7_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 7
Upgrades = Upgrade_HeroLV7Ability
AttributeModifiers = HobbitLevelUpDamage6
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
ExperienceLevel NeutralGollumLevel8
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL8_EXP_NEEDED
ExperienceAward = HOBBIT_LVL8_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 8
Upgrades = Upgrade_HeroLV8Ability
AttributeModifiers = HobbitLevelUpDamage7
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
ExperienceLevel NeutralGollumLevel9
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL9_EXP_NEEDED
ExperienceAward = HOBBIT_LVL9_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 9
Upgrades = Upgrade_HeroLV9Ability
AttributeModifiers = HobbitLevelUpDamage8
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
ExperienceLevel NeutralGollumLevel10
TargetNames = NeutralGollum
RequiredExperience = HOBBIT_LVL10_EXP_NEEDED
ExperienceAward = HOBBIT_LVL10_EXP_AWARD
LevelUpFx = FX:GandalfLevelUp1FX
;LevelUpOCL = OCL_GandalfLevelUp1OCL
Rank = 10
Upgrades = Upgrade_HeroLV10Ability
AttributeModifiers = HobbitLevelUpDamage9
SelectionDecal
Texture = decal_hero_evil
Style = SHADOW_ALPHA_DECAL
OpacityMin = 80%
OpacityMax = 100%
MinRadius = 50
MaxRadius = 50
MaxSelectedUnits = 40
End
End
--------------------------------------------------------------------------------------------------------------------