[RtC] Taking RtC native requests

Status
Not open for further replies.
I'm not sure if that's possible with the current nAPI, but I'll look through it and see if there's anything there...

EDIT: Just had a quick look, and the answer is, I'm afraid, no. It MIGHT be possible to draw over some of the icons through windows, since nAPI provides GetWc3WindowHandle, but actually directly changing the interface is impossible right now. I'm sure it would be entirely possible for MindWorX and SFilip to extend the API to include interface functions, so you could ask in the actual thread, but I doubt it'd come anytime soon.
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Hm.. okay you said you need suggestions, what about this one:

When typing the command "-savehero", I want my hero-unit, hero-level, current hero-experience, last safe-point location, all 6 items, player kills/deaths, and gold to be saved in a separate *.txt file on my computer in the WC3 folder. If possible, the name of the folder to be "SavedHeroes" and each file must have the name of the player as an actual name (eg: Mortar.txt).

Then, when I enter the same game, when I type "-loadhero <playername>" the script to check if the name of the player typing the command is the same as the loaded one, then, make the hero to be loaded (created) on the safe-point that it was lastly saved.
 
if this ever becomes popular enough that everyone uses it blizzard will just ban it 'cause it is better then their stuff o_O

However I've got a few ideas:
-SetSpellCooldown (max cooldown and current cooldown)
-SetSpellManacost
-SetUnitCostGold
-SetUnitCostLumber
-SetUnit(Max)Health/Mana/Armor/Damage (it's possible already but a native will be a lot faster and easier)
-IsPathable without bugs
-SetArmorType
-SetSpellRange
-GetUnitModel (returns string)
-GetUnitDamage (average or min and max)
-GetNextPathablePointX/Y (for unstucking reasons but unnecessary if there is a perfect pathchecking function)
-Set/GetUnitAttackSpeed

-GetMissileModel
-GetMissileDamage
-SetMissileSpeed
-SetMissileTarget
-KillMissile
So I can dump my missile system to trash :S

-Sleep which does not bug

something to extract all doodad creation data so one can place everything using triggers

something to get data from "the internet" directly but that would be too imba anyway (player/game statistics/bans etc.)
just red the warsock thing x)

will add more stuff as soon as I need them
 
I think you should ask TriggerHappy for those, as his NativeX project seems to be aimed at object data stuff -- he's already made SetAbilityName/Tooltip/Icon.

EDIT: I disabled the file i/o natives for now because people on wc3c were bashing me since they could be used to modify stuff like core windows files on your computer.
 
Last edited:
Level 9
Joined
Nov 28, 2008
Messages
704
Why not make your file IO just add a prefix in front of everything it makes? If its sufficiently random, it should be impossible for you to overwrite anything on your computer.

Anyways, I would recommend a physics pack. Something coded in C/C++, or so I assume RtC uses, would be infinitely more efficient than JASS for something like that.

Find a way to automatically set FOV to allow non 4:3 people to use their widescreens without streching. There is already a command for this in WC3; a way to have it set automaticallly based on the users screen size would be amazing, and doable if you can get window size as you seem able to.

A way to set a units model dynamically, if possible. Normally you need Chaos or something for this; I'd like to be able to do unit.modelPath = "something" I suspect that's not within RtC's capabilities at this point though.

I think dynamic image generation would be cool, and your file io could probably manage it somehow if you can dynamically change tooltips.

A way to dynamically generate cliffs would also be win; again though, probably not within RtC's capabilities.

Yeah, I don't have enough time to think of more. Sorry, will try to update later.
 
Why not make your file IO just add a prefix in front of everything it makes? If its sufficiently random, it should be impossible for you to overwrite anything on your computer.
No need, I'm working on something that should make it super-safe, you'll see when it comes out.
Anyways, I would recommend a physics pack. Something coded in C/C++, or so I assume RtC uses, would be infinitely more efficient than JASS for something like that.
The problem is, RtC can't call any of the normal Jass natives at the moment, so there is no way to move units around etc.
Find a way to automatically set FOV to allow non 4:3 people to use their widescreens without streching. There is already a command for this in WC3; a way to have it set automaticallly based on the users screen size would be amazing, and doable if you can get window size as you seem able to.
I can get the game window, but I can't get the game DirectX / OpenGL layer :(.
A way to set a units model dynamically, if possible. Normally you need Chaos or something for this; I'd like to be able to do unit.modelPath = "something" I suspect that's not within RtC's capabilities at this point though.
At the moment it's possible to set a unit type's model dynamically, so, for example, all peasants would change to look like ogres, but with individual units, I don't know if it'll ever be possible.
I think dynamic image generation would be cool, and your file io could probably manage it somehow if you can dynamically change tooltips.
Ok, so you want me code a full bitmap->blp algorithm and embed it in warcraft... That could be a lot of work.
A way to dynamically generate cliffs would also be win; again though, probably not within RtC's capabilities.
You mean changing the cliff terrain in-game? Yeah, that's impossible.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
I got one I wanted for a long time.
GetPointZ(x, y)
And it must also take into account water since GetLocationZ(loc) bugs with water (it looks ugly when you move units according to the terrain height)
 
I got one I wanted for a long time.
GetPointZ(x, y)
And it must also take into account water since GetLocationZ(loc) bugs with water (it looks ugly when you move units according to the terrain height)

This is currently impossible -- there is no access available to whatever data structure contains the terrain map -- but may be in the future.
 
Level 9
Joined
Nov 28, 2008
Messages
704
You cant call normal JASS natives? Damn, that basically limits you, although, you said you can get a windows size?

Native please : GetWindowAspectRatio(). You could set the camera state and just use that native to figure out a fov most likely; I'll play around with it until I understand WC3's fov system if you can add that.

As for a bitmap -> blp, a lot of work? Many such algorithms already exist, Perhaps grab wc3 viewers if possible?

If it is only possible to set a units type dynamically, is it possible to create a new unit type?

Other then that, yeah. I personally hope SC2's Galaxy Editor will already have most of these things. Cant se emyself modding wc3 once the editor comes out in beta.
 
Big Update:
The file system is back, and fully secure (I think). Here's what I've done:
  • Removed the prefixes on the File I/O natives.
  • The natives now only allow you to open files smaller than 1 mb, and if you hit that limit when writing, you won't be able to write any more.
  • The natives can only access one directory and all of its sub-directories on the hard-drive: the SavedData folder in your wc3 installation folder -- this is created as soon as you open a file if it doesn't already exist.
  • You can now specify a path that includes directories which don't exist, and OpenFile will create them for you.
  • You no longer have to specify "modes" for OpenFile -- you can read or write from any file. I added a boolean "append" to OpenFile to keep that functionality.
  • One game (instance of a map) can only open a maximum of 32 different files at one time.
  • Added WriteFileLine and ReadFileLine.
  • Added GetFileSize.
  • Removed IsFileOpen -- if you call OpenFile and the file is already open, it will just return the same id.

@Moog

You cant call normal JASS natives? Damn, that basically limits you, although, you said you can get a windows size?
The RtC guys are working on it, I will be able to soon :D
Native please : GetWindowAspectRatio(). You could set the camera state and just use that native to figure out a fov most likely; I'll play around with it until I understand WC3's fov system if you can add that.
Can't you just do GetWindowWidth()/GetWindowHeight() (or is it the other way round)
As for a bitmap -> blp, a lot of work? Many such algorithms already exist, Perhaps grab wc3 viewers if possible?
Hmm, I might look into it.
If it is only possible to set a units type dynamically, is it possible to create a new unit type?
Not that I'm aware of. You could always create loads of empty ones with ObjectMerger macros for the natives to work with.
Other then that, yeah. I personally hope SC2's Galaxy Editor will already have most of these things. Cant se emyself modding wc3 once the editor comes out in beta.
Yeah... everything we're doing now amounts to nothing... (that wasn't meant to be sarcastic by the way).
 
Status
Not open for further replies.
Top