PDA

View Full Version : Modding or cheating


The Rider
10-13-2010, 07:08 AM
I wanted to create a mod that will not count resurrected units by the paladin skill resurrection as losses at the end of the game, but I couldnt. What I did was to insert the following code in arena.lua (in sessions/orc.kfc). I use this if I play with paladin and I have resurrection 3. Usually I dont resurrect the units in a chosen stack and leave this to the skill. The code takes care about the scores at the end of the game.

Now I intend to start a demon army game and I dont want to tweak the skills and the spells. I will just enjoy the battles no matter how much causalities I will have...which is cheating but who cares, I have played this game so much :-P

Open sessions/orc.kfs
Go to line 373 and after
function calc_bonus( fake_win ) --ftag:bonus

insert this:
Game.GVNum("own_units_leadership", 0)
Game.GVNum("own_units_dead", 0)

Do not search for "function calc_bonus( fake_win ) --ftag:bonus" in the file, there are several lines like that but this works only after line 373.

How does it work? Your last fight in the game must be without losses, i.e. killing Baal without losses or even if you have causalities by him, than before talking to the King, surpress an item and end the fight with 0 losses. All other losses are nulled.

hasim
10-28-2010, 07:25 AM
Do I have to start a new game to take advantage of this?