Jump to content
  • 0

Safety Wall 'Notifications'


Vach

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

Hey everyone, I've been searching the source for ways to implement this, but I figured it was time to enlist the help of some experts.

Essentially, I want the safety wall to either change color or blink when it is down to 2 hits. I can create a variable that works with conf files to allow the number to be set, but I am really confused on the safety wall code.

I also want Penuma to work like Safety Wall (levels with additional hits) but I think if I can figure this out that won't be as difficult.

Anyone have any insight?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

That could be interesting, you could use unit_id2 for that. (They're usually use when unit is active but you could do something like : hit hit remaining 2 hit ok change unit_id, hit hit...)

      	 case UNT_WARP_ACTIVE:
               // warp portal opens (morph to a UNT_WARP_WAITING cell)
               group->unit_id = skill_get_unit_id(group->skill_id, 1); // UNT_WARP_WAITING
               clif_changelook(&unit->bl, LOOK_BASE, group->unit_id);

Need to look how to do it proporly but that where I'd go. Also ofc you'll need thr colored ressource in your client.

For pneuma yeah pretty easy, when you set the SC, (status_change_start::SC_PNEUMA) put one of is val to the number of hit you want to support :

(Actually in current code SC_PNEUMA->val1 = skilllv of pneuma when launched).

So in battle.c where you found if(SC_PNEUMA) {d->dmg_lv = ATK_BLOCK; return 0;} do something like safetywall : if(SC_PNEUMA){ tmp=--SC_PNEUMA->val1; if(tmp==2) changelook; elseif(tmp>0) block; else {end status}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

I have the colored asset (a green one), which is what I'd want to use. The thing blinking is only an option if changing the graphical aspect is not an option.

I'm going to be honest, I'm not familiar with unit_id or unit_id2; I'm actually still learning the source code and I thought this would be a good project for me to learn on. XD I also just realized Safety Wall functions different in Renewal, I may change that as well (I was looking forward to having Safety Wall go to an extreme amount of hits, such as lv 50).

In regards to Pneuma, I found where the blocked hit is declared in battle.c but I'm having a tough time understanding how to attach skill levels to that. On my server you can already level it to 10, but I'm trying to work it into that section of code. May I ask for some help?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

hmm ok I could make you a quick Sequence chart.

So a skill is usually : clif -> unit -> skill -> skill(recursive?) -> status? -> battle -> (sometime again skill...)

Ok so status doesn't have a skilllv attribute, but it's usually assign on val1, to look that let retrace pneuma from skill.

skill_castend_pos2 => ok put an unit for pneuma (something on the ground) => UNT_PNEUMA in our case then depend on skill_unit_db config

...unit will be active when someone step on it...

skill_unit_onplace => case UNT_PNEUMA: //when someone step in UNT_PNEUMA and match the condition (like enemy all etc, on place is only on enter)

==> sc_start4(bl, type, 100, sg->skill_lv, sg->group_id, sg->src_id, 0, sg->limit); //type here is the status we wanna launch it's SC_PNEUMA calculate from skillid

So since we started our status you can see SC_PNEUMA->val1 = sg->skill_lv, SC_PNEUMA->val2 = sg->group_id and val3 = sg->src_id.

On battle.c we usually deal with status, and active skill, like on our case it's

if(skill is ranged and target as pneuma) block atk; // so you just have to do SC_PNEUMA->val1 to know what was the skilllvl of pneuma when it was casted.

nb : now thinking about it, ending the status won't end the unit, so you'll have to do something about it.

about unit_id2 finally may won't be a perfet id, since it's used when the unit is active so dunno, but on the same way you could just replace another unit when this one is almost done.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  326
  • Reputation:   19
  • Joined:  09/27/12
  • Last Seen:  

My apologies for not having replied, I haven't had a chance to take a look at the source in a few days.

I'm still at a loss for the Safety Wall thing. I know this is going to sound like a cop out, but I'm going to need to see some coded examples. Can you make new unit id's?

In regards to pneuma. I'm pretty sure I can see what's going on with it in battle.c; Where is "SC_PNEUMA->val1 = skilllv" located in the code?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...