PDA

View Full Version : Various modding questions


The Red Baron
21-06-2006, 17:20
First of all I wanted to express thanks to all the modders out here for their work on KoH and their helpfulness in posting in these forums. I was tinkering around with the game myself and developed some questions. I have tried to search other threads for potential answers but forgive me if they have already been answered elsewhere.

1. Where can I change the likelihood of mercenary bands showing up or either changing the cost?
2. How do I make trebs, cats, ballistas have limited ammo? I have tried several times looking at posts and other peoples work but can't do it.
3. How do I give regular castle wall improvements a missle defense and chage the tower ballistas and catapults range firepower and firing time.
4. Any ideas on how to drastically penalize a quick declaration of war?
5. I realize that the Globals file has been listed as obsolete, but I was wondering if anyone has had success with these four settings
CStagingDef - off set
CCastle - castle guard cap
Army - Plunder
AI exotics gold threshold
6. Has anyone had any success with connecting hunger in a town (negative food) with happiness under hconst or elsewhere?
7. In the Cleric governors settings it shows that a level four cleric should produce happiness in the town of + 20. I have tired it and have not been able to get it to work. I was hoping to adjust that and spread it out to all levels of cleric governors.
8. What impact does happiness under the econst file have?
9. What impact does market batch under econst file have?
10. Has anyone found the file that eliminates the player’s option of trading for gold with other kingdoms.
11. Has anyone found a way to make exotics upkeep a source of income rather than an upkeep cost. I had the crazy idea of making kingdom advantages kingdom obstacles but I need an incentive for a player to import and therefore incur these disadvantages.

Thanks again to the community for making a good game a better one.

Doux
21-06-2006, 21:21
I'll try to answer what I still know..

1. By my knowing, the appearing of mercenaries is random. There are about 70 in-game, and when one appears, one disappears, that's what I thought I read somewhere. I don't know how to change the cost..
2. Laudan found out about this, I think he explained it somewhere on these forums. Otherwise he'll probably be glad to explain it here..?
5. The globals file is not obsolete, maybe, but I don't think that ever has been tested if changes there have effect?
AI exotics threshold looks very useful, but this does not work: the AI cannot import exotics.
6. This looks like a hardcoded thingy => impossible to mod.
7. You're right, it's a bug or was just removed from the game. More modders have confirmed this.
8. ; happiness
MaxHappiness = 1000
HappyStep = 2
HappyScale = 10
HungerMisery = 3
DreadMisery = 1Looks like it's not used anymore. Maxhapp. is not very useful even if it works - hunger/dreadmisery look like they're not applied (anymore).
10. There is no such file, the only option would be to give only the AI access to Traders.
11. Maybe a negative value works? E.g.: "ExoticUpkeep1 = -10". This would have to be tested though.

What I did not know, I did not mention ;)

Laudan
22-06-2006, 12:42
Hi Red Baron,

here comes the reply to 2:

It was a hard work for my brain to give the trebuchet this great function. My god sometimes i want throw away the computer. Only the ";" give the trebuchets the real function. Now the AI trebuchets and catapults attack only the units. Also the AI rebels with the trebuchets and catapults can win agains the players town. I need now a little calm. i think the laddermens in combat is a great idea.
--
Why cant use the AI the laddermens and battering ram never. The answer is very easy. Units without Attackvalues the AI never used.
--
This info is for the modders:

All in the bold i change.
open defs/units/Military and then the folders trebuchet or siege_catapult or ladderman

trebuchet:


class = CRangedUnitDef

id = trebuchet
name = units;trebuchet
;selradius = 48
;selimage = images/units/selection/sel.img
selimage = images/units/selection/treb_sel.img
walk_speed = 30
projectileid = treb_projectile
fire_projectileid = treb_fire_proj
min_projectiles = 3
max_projectiles = 6
minrange = 300
maxrange = 800
maxforce = 128
shootdispersion = 128
dwTurnTime = 4000
dwTurnDirections = 8

capture = 1
canattack = 1
attackable = 1
mounted = 0
groundonly = 1
nomorale = 1
nocommand = 0
noselect = 0
noplace = 0
hashealth = 1
archer = 1
spear = 0
;siege = 1

battle_pos = 2


small = images/units/icons/small/dummy.img
squad = images/screens/playwnd/Castle interface/army/dummy.img



; cart
walk = images/units/trebuchet/cart_Walk.img
idle = images/units/trebuchet/cart_Idle.img
die = images/units/trebuchet/cart_Die.img

; trebuchet
destroy = images/units/trebuchet/treb_destr.img
deployed = images/units/trebuchet/treb_Turn.img
turn = images/units/trebuchet/treb_Turn.img
turnreverse = images/units/trebuchet/treb_Turn.img
shoot = images/units/trebuchet/treb_Shoot.img





shoot = Sounds/units/trebuchet/
die = sounds/units/diemachine/trebuchet/


spawn = CTrebuchet
maps = c
menu = defs/menus/trebuchet.menu
;menu = defs/menus/unit.menu




ladderman :


class = CUnitDef
id = ladderman
name = units;ladderman
selradius = 16
selimage = images/units/selection/sel.img
walk_speed = 40

capture = 0
canattack = 1
attackable = 1
mounted = 0
groundonly = 0
nomorale = 0
nocommand = 0
noselect = 0
noplace = 0
hashealth = 0
archer = 0
spear = 1
siege = 1



small = images/units/icons/small/dummy.img
squad = images/screens/playwnd/Castle interface/army/dummy.img
wbmeter = Images/Units/Icons/Battle meter/ladderman_%s.rle



idle = images/units/SiegeLadder/ladderman_Idle.img
walk = images/units/SiegeLadder/ladderman_Walk.img
run = images/units/SiegeLadder/ladderman_Walk.img
charge = images/units/CastleGuard/guard_Charge.img
fight = images/units/CastleGuard/guard_Strike1.img
fight1 = images/units/CastleGuard/guard_Strike2.img
die = images/units/SiegeLadder/ladderman_Die.img
taunt = images/units/CastleGuard/guard_Taunt.img
turn = images/units/SiegeLadder/ladderman_Walk.img
;diebywall = images/units/SiegeLadder/ladderman_Die-at-wall.img

holdladder = images/units/SiegeLadder/ladderman_Standbywall.img




fight = sounds/units/fight/
die = sounds/units/die/

sq_march = sounds/squad loops/infantry/march/
sq_run = sounds/squad loops/infantry/run/
sq_charge = sounds/squad loops/infantry/charge/
sq_melee_fight = sounds/squad loops/infantry/melee/



spawn = CLadderMan
maps = c
kill_with_map = 1
menu = defs/menus/unit.menu





catapult_siege:
[opject]

class = CRangedUnitDef

id = catapult
name = units;catapult
;selradius = 40
selimage = images/units/selection/battle.img
minrange = 300
maxrange = 800
maxforce = 128
walk_speed = 30
shootdispersion = 32
projectileid = arrow_treb

min_projectiles = 1
max_projectiles = 3
dwTurnTime = 4000
dwTurnDirections = 8

capture = 1
canattack = 1
attackable = 1
mounted = 0
groundonly = 1
nomorale = 0
nocommand = 0
noselect = 0
noplace = 0
hashealth = 1
archer = 1
spear = 0
;siege = 1




small = images/units/icons/small/dummy.img
big = images/units/icons/big/swordsmans01.img
squad = images/screens/playwnd/Castle interface/army/dummy.img




idle = images/units/catapult-siege/katapult-idle.img
walk = images/units/catapult-siege/katapult-walk.img
die = images/units/catapult-siege/katapult-death.img
shoot = images/units/catapult-siege/katapult-fire.img





shoot = Sounds/units/catapult/
die = sounds/units/diemachine/catapult/
sq_march = sounds/units/movemachine/


spawn = CTrebuchet
maps = c

[/object]


open defs/units/military/units text:

ladderman 200 0 0 0 0 8 400 50 100% 100 30 60 siege workshop 1 laddermen
castle guard 120 0 20 0 n 20 0 0 100% 30 60 melee elite
knight guard 30 250 0 30 0 0 10 0 0 100% 70 120 knight
knight 30 250 0 40 0 0 10 0 0 100% 70 120 +5 knight
ballista 600 0 900 0 40 100,80 1 800 0 100% 500 300,800 siege workshop 3 siege units
catapult 1000 0 4000 0 20 200,300 1 500 0 100% 500 400,2800 siege workshop,armory siege units
trebuchet 2000 0 4000 0 20 200,300 1 600 0 100% 800 400,4200 siege workshop,stable,armory siege units


But if you give the siegeweapon the unlimited ammunition, so you cant use these weapons for the normaly siege slot.

The Red Baron
23-06-2006, 12:55
Thanks for the quick response Doux / Laudan and for all your great modding work,

2. Limited Ammo – Laudan, do you mean that all I have to do for limited ammo is place one semicolon (;) in front of the last line in this listing. That (;) was the only thing I saw in bold.

capture = 1
canattack = 1
attackable = 1
mounted = 0
groundonly = 1
nomorale = 1
nocommand = 0
noselect = 0
noplace = 0
hashealth = 1
archer = 1
spear = 0
;siege = 1

I appreciate you patience because I had tried that before and thought I had tested in out with no affect but apparently I have done something wrong.

5. Globals – I have been messing around with testing some changes but it’s to early to see any real game impact so far. I’ll keep trying.

6. Hunger – that is too bad, I had gotten negative food balances in towns with building and town level changes that I liked and was hoping to add a realistic problem to the happiness computation. For now it just impacts troop building and resupply

7. Cleric happiness – too bad again, lots of potential there

10. Actually I have been keeping the hire merchant option available and just removed the trade option itself. That allows me to control the amount of income the player has more directly because the player can still setup a merchant as a governor to give himself some extra income early in the game.
What I was looking to do was change one of the play windows themselves. There has to be one that controls the text in the drop down menus when you begin a trading action with a merchant.

11. Unfortunately I have tried that and test came out “negative”.

Thanks again Doux and Laudan. If I get any results with the Globals I will post them here.

The Red Baron
--
Laudan, I tried the ; change to get limited ammo and tested it and still it did not work. Are there any other changes that I should be making. Thank you for your help.

TRB

Laudan
23-06-2006, 14:43
Sorry, look here please for more info:

Mod Economic (http://forum.sunflowers.de/showthread.php?t=6361)

The Red Baron
24-06-2006, 15:21
Thanks Laudan I may just paste your settings directly into my own def files.

TRB

qorda
15-07-2006, 23:15
Has anyone tried adding an additional minor bonus to the Governor e.g some more gold in addition to the food with a landlord governor. I have failed to implement it by modifying the relevent defs files. Nothing happens; anyone else been successful? :scratch:

Angryminer
15-07-2006, 23:18
No, I don't think anyone ever succeeded in that.

Angryminer

The Red Baron
17-07-2006, 21:19
I have tried several ways to change the govenors, and I have not found any way to make a new govenor bonus or even use let's say the farmer govenors seige bonus with the builder govenor. I have looked through other peoples mod files and have not seen any success with this idea either.

By the way I have not had any luck with the other questions I have listed above. I have found that determining what changes in the def files through testing and error is very difficult and time consuming.

TRB