wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > Misc. Tutorials
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 06-26-2006, 11:56 PM   #16
PipeDream
Moderator
 
PipeDream's Avatar


Code Moderator
 
Join Date: Feb 2006
Posts: 1,405

Submissions (6)

PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)

Default

A couple people had problems with the stock jAPI loader. Here's a pure vanilla implementation I snarfed off the web with source.
Ripped from http://www.codeproject.com/threads/winspy.asp
Hopefully source for the meat and potatoes of jAPI.dll is coming soon.
Also fixed a serious bug with stack handling-the natives needed another argument on the end.
Attached Files
File Type: rar loader.rar (52.4 KB, 108 views)
__________________
PipeDream is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-18-2006, 09:54 PM   #17
Daelin
Kelani Mage
 
Daelin's Avatar
 
Join Date: Oct 2003
Posts: 737

Submissions (48)

Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)

Hero Contest - First place

Default

I've got a question: How deep can you influence the aspects of the game? I mean... Do you know of a method which can manipulate the attributes of an object? You know... stuff like determining and modificating an unit's armor, maximum HP/MP, and so on and so forth...

I do not really get how this whole system works (I lack advanced programming knowledge) so that is why I'm asking. Don't tell me that I am asking a stupid question, because I already know that, just giving it a try. :P And if not, is anyone capable of transfering a logarithm function from the C++ libraries to JASS? It would be great, because in some cases, such a function could prove very useful. :)

~Daelin
__________________
I am Grand Magister Daelin Silverwing not Grand Admiral Daelin Proudmoore!!!



Daelin is offline   Reply With Quote
Old 07-18-2006, 10:07 PM   #18
PipeDream
Moderator
 
PipeDream's Avatar


Code Moderator
 
Join Date: Feb 2006
Posts: 1,405

Submissions (6)

PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)

Default

The things you mention would be better off modified in JASS. There is voodoo for getting SLK fields which I have not worked out.

Computing logarithms can be done in JASS: http://www.wc3jass.com/viewtopic.php?t=159
Doing floating point work outside of JASS is tricky because you need to make it cross platform. However, numerically intensive work, perhaps custom path finding algorithms, is the sort of thing that this would be good for, because it would not require any more reverse engineering.

log is neat because you don't have to resort to calculus right away, there are a bunch of algebraic tricks.
__________________
PipeDream is offline   Reply With Quote
Old 07-18-2006, 10:07 PM   #19
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

With this it is easy to add a logarithm native. Really easy in fact as long as it is for a mod/campaign/single player map

Quote:
Doing floating point work outside of JASS is tricky because you need to make it cross platform
But is the loader cross platform ?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 07-18-2006, 10:17 PM   #20
Daelin
Kelani Mage
 
Daelin's Avatar
 
Join Date: Oct 2003
Posts: 737

Submissions (48)

Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)

Hero Contest - First place

Default

Actually I am using the logarithm to attempt to detect the armor of an unit... Yes, this will probably be used in my mod if I succeed. I guess I'll have to learn this... Hmm... I'll see...

Oh... SLK fields... that is correct. Well, good luck! I am completely lost at such stuff!!

~Daelin
__________________
I am Grand Magister Daelin Silverwing not Grand Admiral Daelin Proudmoore!!!



Daelin is offline   Reply With Quote
Old 07-18-2006, 10:34 PM   #21
PipeDream
Moderator
 
PipeDream's Avatar


Code Moderator
 
Join Date: Feb 2006
Posts: 1,405

Submissions (6)

PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)

Default

Not to Mac, but cross platform includes between AMD and Intel or even between a P3 and a P4. Unless someone can establish that the floating point units behave _identically_, you will have to use Blizzard's floating point emulation library for arithmetic. Alternatively, you can write float<->double routines in integer arithmetic and do all the FPU work in double precision.
Blizz FP emu Doc

Single player stuff is of course okay.
__________________
PipeDream is offline   Reply With Quote
Old 07-23-2006, 01:24 PM   #22
Daelin
Kelani Mage
 
Daelin's Avatar
 
Join Date: Oct 2003
Posts: 737

Submissions (48)

Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)Daelin is a glorious beacon of light (474)

Hero Contest - First place

Default

Ok... I got the compiler 5.5 you are using as well. I got the test file, and put it in its directory. Then I typed exactly the stuff you mentioned above "bcc32 -WD -e"test.xjp" test.cpp" in the command prompt, but it tells me that I have 7 errors (three paranthesis errors and four Declaration Syntax Error). Am I doing something wrong? Am I supposed to put japi.dll in the compiler directory? Cuz I did and nothing happened.

And I just thought at a super useful function, which would avoid a lot of trouble and complications: a wait function that works for values under 0.27 seconds. If we had that, timers would no longer be that necessary, and neither would handle linking be. Codes would be simpler and faster.

~Daelin
__________________
I am Grand Magister Daelin Silverwing not Grand Admiral Daelin Proudmoore!!!




Last edited by Daelin : 07-23-2006 at 06:58 PM.
Daelin is offline   Reply With Quote
Old 09-22-2006, 10:36 AM   #23
MindWorX
Level 1 Neothelid


Tools Moderator
 
Join Date: Mar 2004
Posts: 254

Submissions (2)

MindWorX has a spectacular aura about (147)

Default

Did you set all the envoirement variables for the compiler?
MindWorX is offline   Reply With Quote
Old 09-19-2008, 09:35 PM   #24
Tastingo
User
 
Join Date: Jun 2006
Posts: 169

Tastingo is on a distinguished road (11)

Default

Would it be possible to save/load files from a computer. Also maybe getting information such as time? (if you wanted the time of the day in the game to match the world's)
Tastingo is offline   Reply With Quote
Old 12-05-2008, 01:35 PM   #25
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Quote:
Originally Posted by Tastingo
Would it be possible to save/load files from a computer. Also maybe getting information such as time? (if you wanted the time of the day in the game to match the world's)

Yes, that is possible.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 04-12-2009, 08:14 PM   #26
elfian
User
 
Join Date: Sep 2008
Posts: 3

elfian has little to show at this moment (0)

Default

Well I downloaded the jAPI tool. To compile the test.cpp file into a .dll I had to do some changes. the fastcall thing and the void* cast when calling jAddNative. I'm using Dev-C++. Well everything went well. But when I started the LoaderWorldEditor.exe it was totally bugged. All the buttons under the menu were missing. The trigger editor was totally destroyed. So I closed it and tried to launch it normally. It was the same. In the end I had to reinstall my whole game, because I couldn't figure the problem. I'm using 1.21b. Anyone could help me?

Last edited by elfian : 04-12-2009 at 09:49 PM.
elfian is offline   Reply With Quote
Old 04-13-2009, 10:07 PM   #27
D.V.D
User
 
Join Date: Jun 2008
Posts: 60

Submissions (2)

D.V.D has little to show at this moment (8)

Default

What if you imported the file that contains the natives and the Japi? Won't it be able to be distributed across b.net then?
D.V.D is offline   Reply With Quote
Old 04-14-2009, 01:00 AM   #28
TriggerHappy
 
Join Date: Feb 2008
Posts: 405

Submissions (2)

TriggerHappy will become famous soon enough (43)TriggerHappy will become famous soon enough (43)

Default

Quote:
Originally Posted by D.V.D
What if you imported the file that contains the natives and the Japi? Won't it be able to be distributed across b.net then?

No, I don't think you know how jAPI works.
TriggerHappy is offline   Reply With Quote
Old 05-24-2011, 04:45 PM   #29
z3r0th
User
 
Join Date: Mar 2011
Posts: 1

z3r0th has little to show at this moment (0)

Default Version

Sorry for ressurect the topic, but i can't make it work

Its supposed to work with witch patch?

I'm tried to make it work with 1.21a, 1.21b, 1,24e, 1,26a with no success.

All with the same problem, the WE can't save the map due to errors in the script
I imported the common.j with the scripts path, used the custom WE loader, and when I save the map, get an error like this:



I'm using Windows 7 64 bits, but i tested (in a virtual machine) with windows xp 32 bits also.


Thanks for any help!
z3r0th is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:56 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2018, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services