• 🏆 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!

Pre-poll: What natives do you want?

Status
Not open for further replies.

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
The end-result goal of this is to make a poll of the top 10 or so natives we would like to see added by Blizzard to add functionality to the game which there is currently none of that you know would be really easy to implement if you had access to the source code.

Limit 10 submissions allowed per post.

1. native GetTerrainZ takes real x, real y returns real
2. native GetEventDamageType takes nothing returns damagetype
3. native GetUnitTypeModelFile takes integer whichUnitType returns string
4. native SetUnitTypeId takes unit whichUnit, integer whichUnitType returns nothing
- - - Taking a shot at Nestharus here ;)
5. native SetUnitFacingInstantly takes unit, real angle returns nothing
6. native PlayEffectAnimationByIndex takes effect whichEffect, integer whichIndex returns nothing
7. native SetEffectPosition takes effect whichEffect, real x, real y, real z returns nothing
8. native GetHostPlayer takes nothing returns player
9. native PreloadObjectId takes integer whichObjectId returns nothing
10. native DetectHackers takes nothing returns nothing
. . . Bans the said hackers from battle.net ;)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The end-result goal of this is to make a poll of the top 10 or so natives we would like to see added by Blizzard to add functionality to the game which there is currently none of that you know would be really easy to implement if you had access to the source code.

Limit 10 submissions allowed per post.

1. native GetTerrainZ takes real x, real y returns real
2. native GetEventDamageType takes nothing returns damagetype
3. native GetUnitTypeModelFile takes integer whichUnitType returns string
4. native SetUnitTypeId takes unit whichUnit, integer whichUnitType returns nothing
- - - Taking a shot at Nestharus here ;)
5. native SetUnitFacingInstantly takes unit, real angle returns nothing
6. native PlayEffectAnimationByIndex takes effect whichEffect, integer whichIndex returns nothing
7. native SetEffectPosition takes effect whichEffect, real x, real y, real z returns nothing
8. native GetHostPlayer takes nothing returns player
9. native PreloadObjectId takes integer whichObjectId returns nothing
10. native DetectHackers takes nothing returns nothing
. . . Bans the said hackers from battle.net ;)

1. Would be nice to avoid location moving but prety much exists already (although slower).
2. Very useful, I support this but should be accompanied with the ability to get the armor type of a unit.
3. Poor idea for a native, rather do something like SC2 and make a GetUnitTypeIdAttribute native which takes an integer and a attribute type (some constants). This would also compliment 2.
4. Plain stupid, the unit type of a unit is about the only immutable attribute it must have cause why not just remake the whole damn unit if you change it.
5. Useful, I agree that should exist.
6. Useful, I agree something like that should exist.
7. Very useful, I agree that a series like that should exist.
8. Stupid as there is no such thing as a host player. Every human player is client of a host system which is not involved in the actual game play at all. If you played one of them hundreds of bot games on battlenet you will realise that the host does not need to be present inside the game. Thus this is an impossible request.
9. Very useful to fix Preload exploit and hopefully work better.
10. Utterly pointless (like DoNothing). Battlenet warden is constantly active and all hackers which are detectable do get banned. It however has a ban delay of up to many months to prevent hackers from having immediate feedback if something is detected.

I would like to see a SetUnitAttribute(integer/real ammount, unitattribute attribute) which would give you access to stats like attack, hitpoint maximum and armor via triggers instead of having to add/remove/glitch abilites.
I would also like to see a TriggerRegisterOnFrame or TimerOnFrame which runs code every internal game frame (not rendered frame).
Finally a RemoveEvent(event e) to allow you to effectivly use dynamic events in a safe way.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
First, I don't think this belongs in the Help Zone.
Second, I'm pretty sure 1 and 5 already exist under different names.

There's no GetTerrainZ. There is GetLocationZ, but that's like a BJ. You need a location for that.

SetUnitFacing isn't instant.

--------------

Some that are not mentioned yet:

JASS:
native SetHeroProperName takes unit whichUnit , string name returns nothing
JASS:
native SetUnitMaxState takes unit whichUnit , unitstate whichUnitState , real newVal returns nothing
JASS:
native SetUnitArmor takes unit whichUnit , integer newVal returns nothing
JASS:
native GetUnitArmor takes unit whichUnit returns real
JASS:
native SetUnitAttackType takes unit whichUnit , attackType whicAttackType returns nothing
JASS:
native SetUnitArmorType takes unit whichUnit , armorType whicArmorType returns nothing
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
8. Stupid as there is no such thing as a host player. Every human player is client of a host system which is not involved in the actual game play at all. If you played one of them hundreds of bot games on battlenet you will realise that the host does not need to be present inside the game. Thus this is an impossible request.

interesting
I thought that the "host-atribute" would be passed on to the next player who is able to host (would explain why game fails after host left and I forgot portforward 6112)
how sure are you that things are like you said?

like I said earlier, 5 already exists.

It's a native function
JASS:
SetUnitFacing (unit whichUnit, real facingAngle) returns nothing

you missed the "Instantly"
however, something similar exists already
you can lock bones to face a desired point/unit with offset
has some drawbacks though

I would like to have
native DestroyEffectForReal takes effect whichEffect returns nothing
so I don't have to recycle dummies to make nice effects without leaks

further an event like "unit fires missile" would be nice (with GetMissile and SetMissileX/Y/Z/Angle, DestroyMissile, SetMissileDamage, SetMissileModel, SetMissileWhatever etc)

...and GetMouseX/Y and GetPressedKey of course
and the CreateImage function (or however it is called) should be fixed so buttons don't have 75% streched borders (and if that happened there should be GetItem/Ability/UnitIconPath)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
interesting
I thought that the "host-atribute" would be passed on to the next player who is able to host (would explain why game fails after host left and I forgot portforward 6112)
how sure are you that things are like you said?
Well, how else do those bots work? Hosting is a separate layer from the actual game play. Hosting is linked to the game, while players are clients of the game. Normally someone provides the hosting and is a client to the game himself but with bots this is not always the case. This is also how you can be disconnected even when playing offline in singleplayer due to bad triggering. There is no actual functional dependiency on players and hosting for a game, as such a get hosting player is impossible.

Think of it like this, when you host a game, you run the game server but also run a client to the server you are hosting. The server does not belong to the client as your client is no different from the other clients in the game. As such there is no link between your client and your server even though you are joined into your server with your client. In the case of bots, the server is emulated via software on a separate computer where no client is present on it.
 
Level 8
Joined
Aug 21, 2009
Messages
333
Well, how else do those bots work? Hosting is a separate layer from the actual game play. Hosting is linked to the game, while players are clients of the game. Normally someone provides the hosting and is a client to the game himself but with bots this is not always the case. This is also how you can be disconnected even when playing offline in singleplayer due to bad triggering. There is no actual functional dependiency on players and hosting for a game, as such a get hosting player is impossible.

Think of it like this, when you host a game, you run the game server but also run a client to the server you are hosting. The server does not belong to the client as your client is no different from the other clients in the game. As such there is no link between your client and your server even though you are joined into your server with your client. In the case of bots, the server is emulated via software on a separate computer where no client is present on it.

Well said. The only way to determine which player created the game would be for your map to somehow check the ip address of the host machine and try to match it with one of the players' ips (in the case where a bot is hosting, the command wouldn't be able to find a match). To be honest though, I don't see the point. I'm content with just having player 1 be in charge of game modes etc. Chances are that player 1 created the game anyway.
 
Dr Super Good said:
4. Plain stupid, the unit type of a unit is about the only immutable attribute it must have cause why not just remake the whole damn unit if you change it.
Well, that's what does Chaos actually, it's pretty usefull and it would be even better if we could choose the unit id (if Bribe thought the function to be that way).

SetUnitAttribute / GetUnitAttribute would be great indeed. :thumbs_up:
Also, a not bugged GetSelectingPlayer and the promised GetTriggeringVariableName... I wonder if Blizzard didn't just taunt us by putting it in the common.j :cry:.
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
I'd like to have a series of natives to extract an object's information, be it important things like damage, attack type and armor type, or other more frequently irrelevant stuff like turning rate. This would probably imply the creation of constants, but if Blizzard could implement just the more important stuff, I'd be happy already.

As for changing unit or hero names, someone once explained to me that the way Blizzard designed things, you could, at most, implement a function to change a unit type's name, but that changing a specific unit's name is impossible.
P.S. -- I think it was someone from the Reinventing the Craft project who told me this.

GetPointZ() would be nice to have, indeed.

But my biggest wishes would go for certain editor stuff, like ability targets. Blizzard made something nice for this in Starcraft II: Required, Excluded and Acceptable(?) classifications. Of course classifications would have to be fixed to be properly usable, too.
 
Level 8
Joined
Aug 21, 2009
Messages
333
Well they can make a function in map header:
JASS:
function GetUnitZ takes unit u return real
    local location l = GetUnitLoc(u)
    local real z = GetLocationZ(l)
    call RemoveLocation(l)
    set l = null
    return z
endfunction

lol, that's not the point. some people don't like the overhead created by the location data type since all it really is is 2 reals that require an extra function call. It's a matter of performance.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
First two can take player maybe, doesn't matter
native GetMouseX takes nothing returns real
native GetMouseY takes nothing returns real
native SetMousePosition takes real x, real y returns nothing
native RemoveTrackable takes trackable t returns nothing
native HideTrackable takes trackable t, boolean hide returns nothing
native EnableCheats takes boolean b returns nothing
native ForceFKey takes integer f returns nothing // f1, f2, f3 etc.. xD
native GetUnitBeingTrainedType takes nothing returns integer // returns type of unit being trained
native DisplayTextFromPlayer takes player fromPlayer, boolean alliesOrAll, real x, real y, string message returns nothing
native GetEventDamageType takes nothing returns nothing

Umm... about the current natives...
Remove delay from selection and keyboard events(I don't get what's wrong with these events?)
Allow DisplayText natives to negative x and y values.
Allow upgrades to level down.
 
Mouse natives would definitely be useful. (Yeah, RtC has it, but you can't detect the player for the events, and overall it is a bit multiplayer-unfriendly)

Also, if they had that, some sort of:
JASS:
native CreateImageOnScreen takes string file, real posX, real posY returns image

That would be great and would lead to tons of creative ideas. :D (as long as you have mouse tracking with it)
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Someone told me that DestroyTrigger() does not destroy a trigger the same way, for example, that RemoveLocation() destroys a location, so the trigger is not actually eliminated, and, quoting the words of the person who told me, shit gets real. I've also seen it mentioned somewhere that it causes fatal errors. So yeah, a fixed version wouldn't hurt, though the necessity to destroy them might be considered dodge-able enough to be a counter-argument.
 
Status
Not open for further replies.
Top