The Dink Network

Reply to Re: Alternative hero and Visions

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
March 7th 2010, 10:14 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Alternate hero.

You'll need to edit some scripts and make your own weapon scripts, but I'll try to guide you through and hopefully it will be easy. I'll even base it off of the silver knight you wanted to use.

(1) Firstly you shoud edit start1.c.

Sp_base_walk() and sp_base_attack() are defined here. Replace those with this chunk of code.
    sp_base_walk(1, 290);
    sp_base_attack(1, 720);
    set_dink_base_push(290);
    sp_base_idle(1,290);


Also, since we will be making our own weapons, replace add_item("item-fst",438,1) with the following line. It will be for the axe as a weapon.

    add_item("item-ax1",438, 6);


(2) Making your new weapon scripts

Copy over item-sw1. We're using this one over item-fst because it includes range and uses a more appropriate hit sound. After you do so, rename it to 'item-ax1'.

Look for the line that says &basehit += 100. Change it to 720. This one is for the silver knight's attack.

Next remove the &strength += 4 and &strength -= 4 from the arm and disarm procedures respectively. You could just change them to 0s to hold the place if you're planning on making different grades of weapons, in which you would add in the +4 or whatever. Just make sure to subtract the exact amount added.

Now remove all the init() lines because we don't need them.

Lastly, add in these lines to the arm procedure to make sure the sequences are loaded corectly
preload_seq(291);
preload_seq(293);
preload_seq(295);
preload_seq(297);
preload_seq(299);

preload_seq(722);
preload_seq(724);
preload_seq(726);
preload_seq(728);


(3) Copy over and modify Dinfo.c

We now need to modify the death script so when the new hero dies, it will play his death sequence. Copy over Dinfo.c and look for sp_seq(1,436). Replace it with the following lines. And after that you should procede to removing the init() lines because (again) they are unnecessary.
sp_seq(1, 295);
sp_frame(1, 1);


I actually scripted this as I was typing it, so I could email the scripts if you want to do it the lazy way