(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Hosted Projects > Reinventing the Craft > Miscellaneous

Miscellaneous A forum for a variety of functions where users may also request other features.

Reply
 
LinkBack Thread Tools Display Modes
Old 07-09-2007, 10:24 PM   #1 (permalink)
 
MindWorX's Avatar

Wulfy loves Nex!
 
Join Date: Aug 2004
Posts: 293

MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)

PayPal Donor: This user has donated to The Hive. Hosted Project of the Year 2007: Reinventing the Craft 

Wishlist

Since i'm creating a bunch of new natives for WC3, i thought that i might aswell just create some more jass functions, incase anyone wants to use them.
First of all, the basic native set, will include only winsock, then i'm going to make another pack, that has C standard math(Only the ones missing), which will be an option for developers that use WarSoc, it will be part of the end user product.

This will be the wishlist for natives you might need, but you should know that i'm not a very good programmer, and i might not be able to do everything.

Wishlist:
  • MindWorX:
    • WarSocAPI - Done, new version coming. Standalone
    • MouseAPI - Partly Done. Part of WarSoc
    • WindowAPI - Partly Done. Part of WarSoc
    • C Standard Math, The Missing Functions - Partly Done. Part of WarSoc
    • C File Reading - I'll add this for the possible use of reading a database included with a map. Also going to add filewriting, but in a way so endusers have complete control. This means they can specify a max filesize and if filewriting is allowed at all. Filewriting will still be limited to text. Part of WarSoc
  • SFilip:
    • Binary Operators. - Still WIP.
    • MD5 and SHA1 string hashing. - Done
    • Encryption - Still WIP.
  • Diablo-dk:
    • Combine SetUnitX/SetUnitY into function. - Still WIP.
__________________
"Wulfy loves Nex!"

Last edited by SFilip; 10-01-2007 at 05:26 PM..
MindWorX is offline   Reply With Quote
Old 07-16-2007, 05:33 PM   #2 (permalink)
 
HappyTauren's Avatar

Banned
 
Join Date: Nov 2006
Posts: 6,459

HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)


native SetExactCameraHeight takes player whichplayer, real height returns real

return real returns "height"

it ignores "average terrain height"
HappyTauren is offline   Reply With Quote
Old 07-16-2007, 07:14 PM   #3 (permalink)
 
MindWorX's Avatar

Wulfy loves Nex!
 
Join Date: Aug 2004
Posts: 293

MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)

PayPal Donor: This user has donated to The Hive. Hosted Project of the Year 2007: Reinventing the Craft 

Quote:
Originally Posted by HappyTauren View Post
native SetExactCameraHeight takes player whichplayer, real height returns real

return real returns "height"

it ignores "average terrain height"
I'm pretty sure that effect can be achieved using
GetTerrainHeight()-DesiredHeight
Either way, that wont be possible yet, i'm not able to change anything of the game using custom natives right now, might be a possibility later, but not right now.
__________________
"Wulfy loves Nex!"
MindWorX is offline   Reply With Quote
Old 07-26-2007, 02:35 PM   #4 (permalink)
 
Razorbrain's Avatar

Awaiting WAR
 
Join Date: Aug 2006
Posts: 1,121

Razorbrain is on a distinguished road (67)Razorbrain is on a distinguished road (67)


2 ideas

1. maybe a "(Damage Type of (Damage Taken)) Equal to "Damage Type" " condition?
2. maybe a "(Level of Buff) Equal to "Number" " condition?
__________________
Quote:
Originally Posted by Inside the Chatroom
[00-25-37] Razorbrain is sitting on the toilet doing private stuff Lirch
[00-25-39] Lirch is sitting on the toilet doing private stuff Razorbrain
[00-25-45] Lirch *censored* Razorbrain in the mouth.
[00-25-50] DrunkenPanda200: WTF?
[00-25-51] Razorbrain: :(

Last edited by Razorbrain; 07-29-2007 at 12:08 PM..
Razorbrain is offline   Reply With Quote
Old 08-04-2007, 09:05 PM   #5 (permalink)
 
SFilip's Avatar

Jack of all trades
 
Join Date: Nov 2005
Posts: 291

SFilip has little to show at this moment (34)SFilip has little to show at this moment (34)SFilip has little to show at this moment (34)SFilip has little to show at this moment (34)


Well anything that involves messing with the game itself isn't really possible. It may be at some point, but for now all you can do is manipulate with integers, reals and strings.
So no, those two aren't possible either I'm afraid.

Anyway my suggestions:
-binary operators (and, or, xor, not, shift left, shift right)
-md5 and sha1 sums
-encryption
SFilip is offline   Reply With Quote
Old 08-04-2007, 11:15 PM   #6 (permalink)
 
Diablo-dk's Avatar

Shifting voidwalker!
 
Join Date: Nov 2004
Posts: 396

Diablo-dk has a spectacular aura about (129)Diablo-dk has a spectacular aura about (129)Diablo-dk has a spectacular aura about (129)Diablo-dk has a spectacular aura about (129)


Combining SetUnitX/SetUnitY into one function will make them faster?

Also, is MouseAPI gonna include mouse-click detection? Most stuff can be done with trackables, but it would possibly be nice for some fps maps.
__________________
Need an easy Recipe System for your map?
Wonder what is inside the Spellbook?
Check my Cinematic!

Vote for the hive, the most friendly wc3 website.
Diablo-dk is offline   Reply With Quote
Old 08-05-2007, 11:12 AM   #7 (permalink)
 
MindWorX's Avatar

Wulfy loves Nex!
 
Join Date: Aug 2004
Posts: 293

MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)MindWorX has a spectacular aura about (122)

PayPal Donor: This user has donated to The Hive. Hosted Project of the Year 2007: Reinventing the Craft 

Quote:
Originally Posted by SFilip View Post
Well anything that involves messing with the game itself isn't really possible. It may be at some point, but for now all you can do is manipulate with integers, reals and strings.
So no, those two aren't possible either I'm afraid.

Anyway my suggestions:
-binary operators (and, or, xor, not, shift left, shift right)
-md5 and sha1 sums
-encryption
For math, this might interest you: Linky
md5 and encryption is going to be part of my next gen WarSoc native set, and i could add sha1 too.

Quote:
Originally Posted by Diablo-dk View Post
Combining SetUnitX/SetUnitY into one function will make them faster?
That might be possible, i'd have to research a little, but i think it's possible.

Quote:
Originally Posted by Diablo-dk View Post
Also, is MouseAPI gonna include mouse-click detection? Most stuff can be done with trackables, but it would possibly be nice for some fps maps.
Going to add full mouse and keyboard key detection, it just proved to be a little harder than i thought, since blizzard is already doing their share of detection for the normal UI.
__________________
"Wulfy loves Nex!"
MindWorX is offline   Reply With Quote
Old 08-23-2007, 05:48 AM   #8 (permalink)
 
Kixer's Avatar

Yawn...
 
Join Date: Jul 2006
Posts: 751

Kixer will become famous soon enough (111)Kixer will become famous soon enough (111)Kixer will become famous soon enough (111)


Are you going to design your own storage system?
If not it would be nice, sorta like LHV but without using a slow ass gamecach?

Heres something me and my friends thought would be fun, adding a chat system to the loading screen?
With the ability to create a map of any size im sure load times would be alot longer so a way of communicating would be nice...
__________________

[ Current Project : Fallen Legends - Anub'arak ]
Kixer is offline   Reply With Quote
Old 08-23-2007, 12:54 PM   #9 (permalink)
 
HappyTauren's Avatar

Banned
 
Join Date: Nov 2006
Posts: 6,459

HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)HappyTauren has much of which to be proud (1015)


he cant hax wc3 that much...
HappyTauren is offline   Reply With Quote
Old 08-23-2007, 02:37 PM   #10 (permalink)
 
Fulla's Avatar

Chaos Overlord
 
Join Date: Aug 2005
Posts: 711

Fulla will become famous soon enough (119)Fulla will become famous soon enough (119)Fulla will become famous soon enough (119)

Paired Mapping Contest #3 Winner: Warcraft Arena 

Well guess I could add a few functions I use, see what you think.


Mainly for projectile spells, a simple one line move a unit towards a direction with an angle:
(Note: Ive split it into 2 lines otherwise it shows up strange in jass tags)
function MoveUnitToPolarProjection takes unit u,real d,real a returns nothing
   call SetUnitPosition(u,GetUnitX(u)+d*Cos(a*bj_DEGTORAD)
   ,GetUnitY(u)+d*Sin(a*bj_DEGTORAD))
endfunction

Get distance between points (instead of locations):
function GetDistance takes real x1, real y1, real x2, real y2 returns real
    local real dx = x2 - x1
    local real dy = y2 - y1
    return SquareRoot(dx * dx + dy * dy)
endfunction

Standard commonly used ones made by Vex and co.

CS Error
function CS_Error takes player ForPlayer, string msg returns nothing
    local sound error = CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
    if (GetLocalPlayer() == ForPlayer) then
        if (msg!="") and (msg!=null) then
            call ClearTextMessages()
            call DisplayTimedTextToPlayer(ForPlayer, 0.52, -1.00, 2.00, "|cffffcc00"+msg+"|r" )
        endif
        call StartSound( error )
    endif
    call KillSoundWhenDone( error)
    set error=null
endfunction

The Minimal Timer usage:
globals
integer TIMERS_N=0
timer array TIMERS
endglobals

function NewTimer takes nothing returns timer
    if (TIMERS_N==0) then
return CreateTimer()
    endif
    set TIMERS_N = TIMERS_N - 1
    return TIMERS[TIMERS_N]
endfunction

function ReleaseTimer takes timer t returns nothing
    call PauseTimer(t)
    set TIMERS[TIMERS_N] = t
    set TIMERS_N = TIMERS_N + 1
endfunction

function InitTrig_TimerCreation takes nothing returns nothing
endfunction

etc. etc.
__________________
Fulla is offline   Reply With Quote
Old 08-23-2007, 03:10 PM   #11 (permalink)

iRawr
 
Join Date: Dec 2005
Posts: 8,349

PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)

Paired Mapping Contest #4 Winner: Fallen Angel - Lucifer's Keep Respected User: This user has been given the respected user award. Map Development Mini-Contest #1 Winner: Stand of the Elements 

GetDistance and MoveToPolarProjection are a little BJ-ish, especially the first. They're probably best inlined. (even if they're made faster as a native, those are really bloated and unneeded. Also, you'd want to use SetUnitX/Y for the first one in most cases anyways)
PurplePoot is offline   Reply With Quote
Old 08-23-2007, 04:23 PM   #12 (permalink)
 
SFilip's Avatar

Jack of all trades
 
Join Date: Nov 2005
Posts: 291

SFilip has little to show at this moment (34)SFilip has little to show at this moment (34)SFilip has little to show at this moment (34)SFilip has little to show at this moment (34)


> Are you going to design your own storage system?
Possibly, but there is little need since the way WarSoc operates should be easy to MUI (MPI actually). In addition there are already much better systems than handle vars around, very fast and quite usable.
However we have an almost complete gamecache replacement when it comes to saving, SQLite based.

Anyway loading screen chat is not really possible - you wouldn't be connected until after the map loads.

And turning some functions like MoveUnitToPolarProjection into natives would produce very, very little speed gain, pointless to do really.
SFilip is offline   Reply With Quote
Old 08-24-2007, 09:37 PM   #13 (permalink)
 
Silvenon's Avatar

BBoy Silv
 
Join Date: Nov 2006
Posts: 866

Silvenon is on a distinguished road (81)Silvenon is on a distinguished road (81)


A GetSpellTargetPointX/Y maybe? It's kinda irritating to always extract coordinates from GetSpellTargetLoc() and then destroying that location afterwards. I will think of some other natives later
__________________
PurgeandFire111: Then you can delete the sound and whala... You have the label,filepath, and other parameters.
Silvenon: It's voila, not whala, you... stupidhead :)
PurgeandFire111: Yeah, I was in a rush. =( *cry*
Herman: Voila is an instrument that I quit playing in 6th grade, whala works just fine if not better
PurgeandFire111: No, viola is an instrument. Stupidhead... =D
Silvenon is offline   Reply With Quote
Old 08-24-2007, 11:17 PM   #14 (permalink)

iRawr
 
Join Date: Dec 2005
Posts: 8,349

PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)

Paired Mapping Contest #4 Winner: Fallen Angel - Lucifer's Keep Respected User: This user has been given the respected user award. Map Development Mini-Contest #1 Winner: Stand of the Elements 

Yeah, that would be nice.

GetSpellTargetX
GetSpellTargetY

--or--

GetSpellPointX
GetSpellPointY

Would be the best names, imo (GetSpellTargetPointX is sorta long/redundant, and anything shorter may not convey the message as well)
PurplePoot is offline   Reply With Quote
Old 08-25-2007, 12:37 AM   #15 (permalink)

im Smart :b
 
Join Date: Mar 2007
Posts: 7

DiCe[ultimate] is an unknown quantity at this point (0)


i request that DotA cannot use more then 12 players or the join while playing thing otherwise warcraft will implode on DotA, no joke, there will be about 99% DotA in the custom game list on bnet if you allow DotA to use it and the amount of Dota games will just increase. It will change from a nuisance to an epidemic.
DiCe[ultimate] is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Model Wishlist for Part II of my Campaign kam_Islash Requests 1 09-07-2004 10:48 AM

All times are GMT. The time now is 09:37 AM.






Your link here 
Cheap Magazine Subscriptions | Remortgages | Internet Advertising | Debt Consolidation |