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

FVO WC3 Mod

Status
Not open for further replies.
Level 4
Joined
May 1, 2007
Messages
51
What is it?
The FVO WC3 Mod is a PC/Windows plugin for Warcraft III: Frozen Throne.

What does it do?
The plugin facilitates communication between a map and a central server, allowing for such things as a centralized character storage (No -save/-load codes)



Details:
FVO WC3 Mod works by hooking the Warcraft III: Frozen Throne executable.
By reading/writing from a specific location in the WC3 memory, messages can be passed between the map and the plugin (Accessible via JASS scripting)
What information is sent, and how it's handled can be entirely specified in the JASS script of the map.
Allowing not only centralized server communication, but also dumping information to a file (The original idea behind FVO WC3 Mod was to create a plugin that would dump a -save code to a textfile, instead of forcing players to take a screenshot)
The plugin is written in FreeBASIC 0.16b, and uses SDLNet for networks communications.
It will be open source and released freely once completed.
It is currently PC/Windows only.

Possible applications:
The plugin could be used to create dynamic maps, where you use JASS to trigger doodad placement/terrain textures.
Centralized character storage. Doing away with -save/-load codes.
Global multi-game-spanning chat, chat with people playing in different WC3 games.
Global player shops/trading, allow players to setup global multi-game shops, and/or to trade with each other directly.
Dump information to a file for the player to read later. A possible alternative to -save/-load screen-shooting.
And much much more.

Current status:
-WC3 to plugin, and vice versa, communication: 100%
-Communication with a centralized server: 100%
-Centralized server software: 50% (It's functional, needs more bells 'n whistles)
-JASS scripts: 25% (A generic set of JASS functions showing how to use the plugin)
 
Last edited:
Level 4
Joined
May 1, 2007
Messages
51
Due to the way WC3 handles multiplayer games, there were quite a few security problems (Could potentially allow someone access to any file on your computer if they knew the path)

The problem is caused by the fact that in multiplayer WC3 share ALL information with ALL players. This is so another computer can take over the host position if the original host leaves.

In addition, we're still not happy with the performance of the plugin (It takes 30seconds to 3 minutes to start, with heavy lag)

We're working on a solution to both problems.

A possible solution for the MP bug, is to only allow the map to be played in single player, with multi game communications done via the FVO WC3 Mod.
(Multi game communications include such things as player shops, global chat, etc. Pretty much anything you could think of)

The downside of this approach, would of course be that there is no "real" multiplayer. Which would severely hinder the spreading and availability of the map.
 
Level 5
Joined
May 2, 2007
Messages
141
couldnt a password be implemented for security?

I dont like the idea of my pc being open to others, so with some kinda password system it would be safer. . .

When this is finished it will be great for RPG's.
 
Level 4
Joined
May 1, 2007
Messages
51
WC3 to plugin, and vice versa, communication completed.

Basic set of JASS triggers being created.


Help needed!
WC3 should (In theory) keep a table somewhere holding the memory locations of variables created in JASS.
If any of you know the address of that table it would be incredibly helpful.
 
Level 5
Joined
Jun 23, 2004
Messages
126
I am completely looking forward to this! The centralized server would be nice, but would cost money no doubt, so I want to be able to read/write to some sort of file on the player's computer, to hold the Save/Load codes there.

What would also be nice would be to detect if the Plugin is running, and if not to display the code. So you don't need it to play, but having it makes it much more fun and easy.
 
Level 4
Joined
May 1, 2007
Messages
51
I am completely looking forward to this! The centralized server would be nice, but would cost money no doubt, so I want to be able to read/write to some sort of file on the player's computer, to hold the Save/Load codes there.

What would also be nice would be to detect if the Plugin is running, and if not to display the code. So you don't need it to play, but having it makes it much more fun and easy.
Regarding the centralized server, seeing as I'm co-founder of a server hosting company I'm sure we're gonna work out some kind of special deal for FVO WC3 Mod stuff.

Detection of the plugin is now implemented, and as suggested -save codes only display if it's not running. (Codes can be "forced" to be shown)
 
Level 4
Joined
May 1, 2007
Messages
51
Simple demonstration of the plugin.
Mostly just showing that it actually exists and works.

Unprotected map, including the FVO JASS script (Not cleaned up, not optimized)

Download: View attachment FVO WC3 Mod v0.1.0.zip
Unpack the zip archive to your Warcraft III: Frozen Throne folder, run StartFVORPG.exe to start the plugin and WC3.
Be sure to read any information shown.

The map extracts to Maps\FVO WC3 Mod\FVO-demomap.w3x by default.

Once you have started the map in WC3, alt+tab back out to the confirmation box and click OK.
alt+tab back into WC3 and wait for FVO to finish loading. This may take several minutes depending on the speed of your computer (Subsequent loads should be notably faster).

Once it's done you should see something like this:
WC3ScrnShot_051607_135354_01.jpg

Please report crashes, bugs, problems and anything else you can think of!


EDIT: IT DOES NOT, AND WILL NOT EVER WORK WITH A CRACKED VERSION OF WARCRAFT III, SO DON'T ASK!

EDIT 2:
Please post the contents of the scan.log file, it can be found in your Warcraft III: Frozen Throne folder once the mod has been started.
The contents of this file will help me speed up the plugin load time significantly. Also it is vital that you post this file if you experienced a crash.

Also, following up on the previous edit. Do not post crash reports if you're using a cracked version of Warcraft III: Frozen Throne.
 
Last edited:
Level 4
Joined
May 1, 2007
Messages
51
The edit button is there for a reason
Unrelated posts are unrelated. Double post is there for a reason.

Also, last time I checked, editing a post does not mark the topic as having new content. I could be wrong, feel free to correct me.

Did you have anything else to say, or you just felt like bashing me for cluttering the forum? And in doing so cluttering it even more?

It's not like the posts are minutes part from each other. (Well, actually the first two are, seeing as they were split from the FieldView Online RPG topic)
 
OFFTOPIC: As far as I know, editing dose NOT mark new content, but I think it should, although there are reasons as why it dosnt..Anyway, Its "against the rules" to double post, no matter what, so you should do it...

ONTOPIC(Thank goodness): It looks really nice! [broke=+ REP!]Jattenalle[/broke]
Oh...also, I dont think people we even be USEING PLAIN OLD WARCRAFT IIII, so you might want to fix that typo.
 
Last edited:
Level 11
Joined
Sep 1, 2006
Messages
443
Sounds very useful and a great idea, hopefully though no security loopholes, then it would become quite well....useless, good luck!

Edit: I tested this myself and i got it to work flawlessly, i must say, this tool seems both promising and powerful! Though once again i hope no security problems..keep at it, great so far!
 
Level 4
Joined
May 1, 2007
Messages
51
Sounds very useful and a great idea, hopefully though no security loopholes, then it would become quite well....useless, good luck!

Edit: I tested this myself and i got it to work flawlessly, i must say, this tool seems both promising and powerful! Though once again i hope no security problems..keep at it, great so far!
Nice to hear you got it working.
I'm working hard to counter any security risks there might be.
The most urgent problem is the lengthy load time.

If you could please post your scan.log that would be very helpful.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Nice, but sucerity risks? There is no computer 2 computer comunication needed next to WC3. You need to get the server to do all the sending of the files to the computers and use WC3 to syncronize. Basicly you detect all the players playing and each player orders the server to get them a coppy of their data so that each player would have each other players load data as well. You may have to then use the server to send a syncronized beep to everyone saying that all players have the data and that it can begin loading the data into WC3 if it is having OUS troubles. Finally all that is needed is for the person to say -load to load their hero since all data is syncronized and the load system is up to the map maker.

Only trouble with this method is the ammount of data that is required to be sent, up to 12*12 (for a 12 player save/load) making 144 save strings of probably 50 or more bytes and about 10. Comming to 7.03125 KB which could cause troubles on slower servers. But that should be of no trouble.

Also maybe allow the storing of multiple strings for a map for a player and the ability to load them in other maps than the saver since that would allow for more variable storage of data for RPGs that cover many maps.

If you can find the variables that JASS engine uses to work (globals and stuff) you can find them even faster and thus cut down loading times I think since there would be fewer variables to scan.
 
Level 4
Joined
May 1, 2007
Messages
51
"so that each player would have each other players load data as well" Thats the security problem, you can steal other peoples characters.

Also, 7kb is nothing, even my old 286 can handle 7kb without a problem. Your avatar alone is over 20kb.

"Also maybe allow the storing of multiple strings for a map for a player and the ability to load them in other maps than the saver since that would allow for more variable storage of data for RPGs that cover many maps."
Not sure what you mean :S

The amount of variables doesn't matter. Due to DMA the JASS is located in a different location each time you start WC3. I have to scan the entire memory range to locate where the JASS actually is. The memory range is 0 to 2^32-1, or 0 to 4gb (Yes, even if you only have 128mb RAM or something)
The scanning of those 4gb is what takes time.
Finding a fixed offset value would speed things up, but so far I've found none. (It seems PX3W is dynamic since 1.21)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Thats why in my idea I said that the SERVER would store the data and not the players computers so thus you can not "steal" some one elses code since as it arrives it would be put into to WC3, the only reason it is sent to all players is for sync but only the saving player actually has to care about loading / saving his code.

Also only hackers know how to steal codes and thus it is pointless to worry about it since most hackers do not bother with this game and play on WoW to make money.

As for the momory, WC3 NEVER uses 4GB of ram and so you do not need to scan it all. Just scan part of it for what yo uare after, 500 MB at most and this is in heavily demanding maps. Maybe try using an external scan that scans only the memory that WC3 is currently using since most people do not have 4Gb of ram and thus it would be pointless to scan what does not exist. Somewhere in the OS should be a piece of data (maybe hidden in RAM) that allocates the memory of your computer. If you can use that to get the exact range that WC3 is using (since wc3 does not use all the RAM available) you can have a much smaller area to scan.
 
Level 4
Joined
May 1, 2007
Messages
51
Thats why in my idea I said that the SERVER would store the data and not the players computers so thus you can not "steal" some one elses code since as it arrives it would be put into to WC3, the only reason it is sent to all players is for sync but only the saving player actually has to care about loading / saving his code.

Also only hackers know how to steal codes and thus it is pointless to worry about it since most hackers do not bother with this game and play on WoW to make money.

As for the momory, WC3 NEVER uses 4GB of ram and so you do not need to scan it all. Just scan part of it for what yo uare after, 500 MB at most and this is in heavily demanding maps. Maybe try using an external scan that scans only the memory that WC3 is currently using since most people do not have 4Gb of ram and thus it would be pointless to scan what does not exist. Somewhere in the OS should be a piece of data (maybe hidden in RAM) that allocates the memory of your computer. If you can use that to get the exact range that WC3 is using (since wc3 does not use all the RAM available) you can have a much smaller area to scan.

All data is shared between all players in WC3 MP games. It doesn't matter where the code is stored, the data is still shared. But like you pointed out, it's a minor problem, it just annoys me.

All 32bit computers have a 4 GB memory address range. Even if you only have 64MB of RAM, the address range is STILL 4GB.
The address range have nothing to do with the amount of RAM.
Think of it like this, you are given a task to place 10 random values, in random positions ranging from 1 to 1000.
It doesn't matter that there's only 10 values, one must still look through all 1000 positions to find your 10 randomly placed values.

Now make that 4294967296 positions.

Trivia: With 64bit computers the number of positions increase from 4294967296 to 18446744073709551616

It does not matter that you only have 128MB RAM, and that WC3 only takes 90MB.
 
Last edited:
Status
Not open for further replies.
Top