How to order 'Restoration skill' ?

trial1938

New Member
Reaction score
0
Hi,

I have copied 'Restoration Scroll' ability and modifed it into hero-skill,

and it works well with clicking in the game,


But I have a trouble in using the skill with IssueImmediateOrder func.

I tried the skill with both an order string of "restoration"

and an order ID of "restoration" but it does not work.


Do you have any idea for this issue related "restoration" ??


Thanks
 

Nestharus

o-o
Reaction score
84
If you are using it as a hero skill, then you wouldn't be doing it as an order. You can't make new orders on a whim. You'd be calling the ability =).


So, order the unit to use the ability ; ). It's one of the order natives (an order to use an ability) or something like that, but there are so many so I don't know it off of the top of my head.

But yea, that should point you in the right direction.


So look for a native for using hero abilities and not for one that works off of strings. Also make sure to plug in the ability 4 character raw code id.

Give me a moment and I will find the native for you.

Edit
After doing some research (I mostly create everything from scratch, so I hardly use object editor data at all), you can really only cast Wc3 spells through the spell string =).

Each ability has an accompanying order. I'm sad to tell you that the ability on Scroll of Restoration has no order id, so you can't actually order a unit to use an ability that does something similar to it.
 

trial1938

New Member
Reaction score
0
Each ability has an accompanying order. I'm sad to tell you that the ability on Scroll of Restoration has no order id, so you can't actually order a unit to use an ability that does something similar to it.

Oh, such a sad news! how poor WC3 system is!!

then I have to discard it and code the ability with a trigger.

Thank you for your answers.
 

Nestharus

o-o
Reaction score
84
You can always use the holybolt order id (holy light or w/e on paladin) and a regeneration thinging (from regen) and a mana regen thingie and one other thingie for instant restore on mana if you could find the order ids.

Scroll of Restoration is a combo of those 4 elements, so if you can find order ids that combine into that same effect you'll get exactly what you've been looking for.

If you can't find all of them, you can still use the ones available and script the ones that don't exist.



= )
 

chobibo

Level 1 Crypt Lord
Reaction score
48
Nestharus said:
After doing some research (I mostly create everything from scratch, so I hardly use object editor data at all), you can really only cast Wc3 spells through the spell string =).

JASS:
call IssueImmediateOrderById(caster, 852281)


Use integer order identification (order Id). 0xd0139 (hex) : 852281 (dec) is the orderId of the Scroll of Restoration.
 

Nestharus

o-o
Reaction score
84
Hmm... when I looked through object editor it had no associated order with it. The ability itself can't be used from my experience as it only results in skilling up the ability.
 

Azlier

Old World Ghost
Reaction score
461
The object editor lies. Every order has an integer id associated with it.
 

Nestharus

o-o
Reaction score
84
So if there is no order id, then the ability id can be used, and if the ability has no levels: a default ability of a sort, when ordering the ability it casts the ability rather than learns it ;\. This makes absolutely no logical sense and so I don't even see how this is possible ^_-.


This is why I hate doing anything that has to do with the object editor... rather code it out ><


The object editor lies. Every order has an integer id associated with it.

I already knew this in regards to string orders also having order ids... that's rather obvious. I don't know if you read me right so confirm the above -.-.
 

Azlier

Old World Ghost
Reaction score
461
EVERY ORDER HAS AN ORDER ID. Using the ability id does nothing.

It's just that not all orders have order strings associated with the order integers.

It seems that when you think of order, you think of the order string.
 

Nestharus

o-o
Reaction score
84
I don't think you read any of this thread right then.


We are talking about a given ability having an order associated with it, not an order having an order id.


You're just making things very confusing as you are saying things that make absolutely no sense in regards to what is being discussed : )


Hmm... when I looked through object editor it had no associated order with it. The ability itself can't be used from my experience as it only results in skilling up the ability.

This says that the ability doesn't have an order associated with it and you responded with this-


The object editor lies. Every order has an integer id associated with it.

A completely confusing statement that doesn't even relate to what it's responding to : P. You are saying every order has an order ID and I'm saying the ability doesn't have an order. How does that relate?
 

Azlier

Old World Ghost
Reaction score
461
Every ability has an order id. When I think 'order', I think 'what causes a unit to take a certain action'.

Every ability has an order. An order is an integer. Order id's also sometimes have string equivalents.
 

Nestharus

o-o
Reaction score
84
We're talking about casting the ability, not skilling it up ; )


So, are you telling me that some orders are casted and not skilled up when you use their order id and some are skilled up and not casted? The factor that determines the role of an ability when being ordered is whether or not it is a hero ability?
 

Azlier

Old World Ghost
Reaction score
461
Exactly. Every ability has an order integer, that when a unit is issued that order, casts the ability.
 

Nestharus

o-o
Reaction score
84
So, sometimes the order integer is the ability and sometimes it is the string converted into an id?

Or can you only retrieve the ids with a unit ordered event and displaying the order id.

That is, each ability actually has 2 orders.
 

Azlier

Old World Ghost
Reaction score
461
An ability's order id is never the rawcode of the ability itself, unless you wanted to somehow specifically engineer the rawcode that way :nuts:.

Every ability has an order id that can be used to cast the ability. This order sometimes also has a string matched to it. For example, Storm Bolt has an integer order. The string matched to this integer order is "thunderbolt".

I have a theory that the IssueOrder functions that take a string merely find the matched integer and call the IssueOrder...ById functions with them. Or some process close to that.
 

Nestharus

o-o
Reaction score
84
Actually an ability does have an order id that is the raw code of the ability.


When using the raw code it skills it up.


Thus it stands that each ability has 2 orders associated with it: the rawcode id and the internal order for casting it.


It seems that the only way to retrieve the internal order is by catching it in use.



There is also the strings. So, now at this point I'm assuming that there are actually 3 orders involved-
Rawcode: skill up
Order ID: actual spell
String/Order ID: Default wc3 spell data


And so when casting an ability, it uses the plain custom order id. When casting a default wc3 ability, it uses string/order id combo. When learning an ability, it uses the rawcode id.


Just seems like an extra load of work for no reason... oh well -.-.


Oh, my assumptions arise from the fact that a string order id can only use default wc3 data. If each ability has a unique id associated with it, then there must be custom ids.
 

Azlier

Old World Ghost
Reaction score
461
>retrieve the internal order is by catching it in use.

Yes.

>When using the raw code it skills it up.

Lots of rawcodes can be used as orders in some way. Using a unit rawcode on a structure issues a "train this unit" order.
 

Nestharus

o-o
Reaction score
84
So, now here's an interesting thought.


If you were to catch an order in use and it was a default ability, would it return the string order converted into an id or the custom id?



If you were to catch a custom ability in use, I assume it returns the custom id.


Oh and to Trial, I suppose whenever you want to retrieve an order id, just catch it using something like this-

JASS:
private trigger t = CreateTrigger()

private function catch takes nothing returns boolean
    DisplayTextToPlayer(GetLocalPlayer(), 0, 0, I2S(GetIssuedOrderId())
    return false
endfunction

private function ini takes nothing returns nothing
    TriggerAddCondition(t, Condition(function catch))
    TriggerRegisterUnitEvent(t, CreateUnit(Player(0), unitType, x, y, facing), EVENT_UNIT_ISSUED_ORDER)
endfunction
 

Azlier

Old World Ghost
Reaction score
461
An order is always an integer, in my theory. The string is just to make it easier to order stuff.

To even get a string order in action, you have to convert it FROM an integer, since the only native that returns an order returns an integer.

[lJASS]GetIssuedOrderId[/lJASS], I believe. [lJASS]OrderId2String[/lJASS] tries to give you the matching string.
 

Nestharus

o-o
Reaction score
84
But there is still the fact that there must be up to 3 orders associated with a given ability... that is unless when you use an ability's order id it using default data?


Or perhaps it is that when you use an order's ability id on a unit it looks through the spells and finds the closest match, which makes things even more confusing : ).


What I do know that is common knowledge is that when using an order's string order, it will always use default warcraft 3 data.


But then when an ability is used, it must have an order associated with that specific ability and custom data, so there has to be a second custom order.

The idea is, will the issued order event return the default order or the custom order? Or is it my above thought: finding the closest match
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top