• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Native Questions

Status
Not open for further replies.
Level 31
Joined
Jul 10, 2007
Messages
6,306
So what exactly do these do. I google and come up with nothing

JASS:
//?? this looks like an AI native
native          SetUnitCreepGuard   takes unit whichUnit, boolean creepGuard returns nothing

//these have to do with inventory?
native SetAllItemTypeSlots          takes integer slots returns nothing
native SetAllUnitTypeSlots          takes integer slots returns nothing
native SetItemTypeSlots             takes unit whichUnit, integer slots returns nothing
native SetUnitTypeSlots             takes unit whichUnit, integer slots returns nothing

I guess I know all the rest

tx ;D
 
Level 7
Joined
Dec 3, 2006
Messages
339
These are probably just a guess but. . .


JASS:
native          SetUnitCreepGuard   takes unit whichUnit, boolean creepGuard returns nothing
//Orders the unit to follow the first unit ordering him to effectively guard the other creep 
//which would work to increase camping radius for creeps

native SetAllItemTypeSlots          takes integer slots returns nothing
native SetItemTypeSlots             takes unit whichUnit, integer slots returns nothing
//Uhm, it's really awkward and vague. 
//But i think it has to do with hero inventories versus non hero inventories.

native SetAllUnitTypeSlots          takes integer slots returns nothing
native SetUnitTypeSlots             takes unit whichUnit, integer slots returns nothing
//These probably have to do with units being heroes or not. 
//Cuz I think they are kind of called through the editor in a strange way like as parts of abilities. 
//So using them is probably out of the question.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
The below 4 functions have to do with shops selling items/units. You can limit the amount of types they have in offer/slots they can use for. See Neutral Structure - Limit Item Slots (Of Marketplace) etc. in GUI. This only refers to the shopping method with the ability 'Sell Items'. However, adding/removing items/units is very buggy.

If you know the rest you can maybe tell me what

JASS:
constant native GetResourceDensity   takes nothing returns mapdensity
constant native GetCreatureDensity   takes nothing returns mapdensity

native SetResourceDensity   takes mapdensity whichdensity returns nothing
native SetCreatureDensity   takes mapdensity whichdensity returns nothing

constant igamestate GAME_STATE_DIVINE_INTERVENTION          = ConvertIGameState(0)

are for?
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
ResourceDensity has to do with gold/lumber in mines and trees

Notice-
JASS:
constant mapdensity MAP_DENSITY_HEAVY=ConvertMapDensity(3)
constant mapdensity MAP_DENSITY_LIGHT=ConvertMapDensity(1)
constant mapdensity MAP_DENSITY_MEDIUM=ConvertMapDensity(2)
constant mapdensity MAP_DENSITY_NONE=ConvertMapDensity(0)

Notice that you can't set resources on destructables? : P

Also, just saw this
JASS:
    // Limit stock inventory slots.
    call SetAllItemTypeSlots(bj_MAX_STOCK_ITEM_SLOTS)
    call SetAllUnitTypeSlots(bj_MAX_STOCK_UNIT_SLOTS)

Those values are 11 (meaning it refers to the number of squares that hold abilities and sell units and stuff) (0-11)

Meaning that the slots shouldn't be used
JASS:
constant integer bj_MAX_STOCK_ITEM_SLOTS=11
constant integer bj_MAX_STOCK_UNIT_SLOTS=11

Well, I guess you could lower the number, but why? : P

This

GAME_STATE_DIVINE_INTERVENTION is some bs blizzard crap that has no real use.
 
Last edited:
Level 7
Joined
Dec 3, 2006
Messages
339
Well, I guess you could lower the number, but why? : P

In case you wanted to make a shop that sells x units and y items, and through triggers generate the items/units that are sold by the shop. It's to make it easier by being able to split a market type shop up between units or items but it still doesn't make much sense.
 
Hum, after a test, this one :
JASS:
native          SetUnitCreepGuard   takes unit whichUnit, boolean creepGuard returns nothing
It enables/disables the unit auto-return to its previous positions. Creeps have it enabled by default and they always return to the point they were created if they move too far away - that's what this function is about -. It works on non-neutral units too.
The "previous position" seems to be the unit's position when you called the function (or the creating position).

Since we are on it, what exactly is rarity in unit's animations :
JASS:
    constant raritycontrol  RARITY_FREQUENT                 = ConvertRarityControl(0)
    constant raritycontrol  RARITY_RARE                     = ConvertRarityControl(1)
native          SetUnitAnimationWithRarity  takes unit whichUnit, string whichAnimation, raritycontrol rarity returns nothing

?
 
Since we are on it, what exactly is rarity in unit's animations :
JASS:
    constant raritycontrol  RARITY_FREQUENT                 = ConvertRarityControl(0)
    constant raritycontrol  RARITY_RARE                     = ConvertRarityControl(1)
native          SetUnitAnimationWithRarity  takes unit whichUnit, string whichAnimation, raritycontrol rarity returns nothing
?

You know how some units have stand - 1, stand - 2, stand - 3, etc..? Well, that is what the rarity is for. Stand - 1 is usually the default animation, where the unit is simply looping a stand. However, stand - 2 is usually something different, such as looking around or something along those lines. Those kinds of animations are considered to be the "rare" ones.

The "frequent ones" are usually just the initial animation, such as stand - 1. :)
 
Status
Not open for further replies.
Top