HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

write/read files

11-20-2005, 10:46 PM#1
HotWired
Now I do have my disbeliefs in this, but is there a way you can write and read text files with jass or something? If so how? If this is possible then I will start working on a huge project im thinking of.
11-20-2005, 11:59 PM#2
Tim.
What do you mean? Write information to an external text file? Why would you need that when you could use a GameCache?
12-19-2005, 12:55 PM#3
qwertyui
Quote:
Originally Posted by Tim.
What do you mean? Write information to an external text file? Why would you need that when you could use a GameCache?

Ability to write game data in files basically would allow WC3 to interface with other programs.

In theory, it would allow people to create their own custom little battle.net for their custom games.

Sadly, Blizz did not present any functions that enable it.

If you are really smart on low-level comp operations, i guess you could find a way to dump the gamecache with third-party software. But that's hacking (=no bnet) and i don't think it is really possible.
12-19-2005, 12:58 PM#4
qwertyui
Hmmm, now that i think about it...

A workaround MAY be possible by digging inside autosaved replay files.

It would require an immense amount of work and some unique level of knowledge about *.w3g file structure.
12-19-2005, 12:59 PM#5
Zoxc
Or you could dump memory variables via third-party software... but its kinda hard to get it back in without creating desync...
12-19-2005, 01:03 PM#6
qwertyui
Quote:
Originally Posted by Zoxc
Or you could dump memory variables via third-party software... but its kinda hard to get it back in without creating desync...

Have you done it before?
12-19-2005, 01:16 PM#7
Zoxc
Nope, but I know its possible ;)

But if it didn't create a desync .. why don't everyone use a wc3 trainer ...
12-19-2005, 01:22 PM#8
Blade.dk
What is a wc3 trainer?
12-19-2005, 01:25 PM#9
Zoxc
A thing that give you many lumer gold unlimted food and such.. Exists for nearly all games -.-
12-19-2005, 01:56 PM#10
qwertyui
In single its not used, becaused cheats are always available.
I think people don't use it on bnet, because blizz will detect and ban.

Hmmm i am suddenly very curious.

Even just an ability to export variable values from wc3 in-game, without putting them back in, would prove incredibly beneficial and really expand the modding posibilites.

Do you know how to, or know anyone who knows how to, write a program which can take a specific wc3 variable and write its contents in file?

Also do you know anyone who is familiar with w3g file structure?


I have some questions to ask :)
12-19-2005, 02:27 PM#11
Zoxc
1) I think RodOfNod made a kind of this program once. I'll ask him.

2) Must be PitzerMike -.-
12-19-2005, 05:20 PM#12
Starcraftfreak
Some of the stuff you guys are talking about will be done in PR. I can't disclose any details, but I can tell you that this form of dirty hacking is possible. Mostly it's direct memory hacking as far as I understood (I'm only a Jass scripter for PR, not the WC3 hacker). But why would you want to do that?

Anyway, I don't think it's a good idea to use gamecache as an interface. How would you notice, that it got updated from outside. Then, writing to file is slow, even slower than GC already is. So it would be a narrow interface.

If this is any help to you (about W3G):
http://www.wc3campaigns.com/showthread.php?t=10228

Since the attachment is gone, I will dig it out somewhere. Please stand by.

Edit:
@Zoxc:
Neither of those wrote the really evil (but working just fine) code...
12-20-2005, 09:59 AM#13
qwertyui
Quote:
Originally Posted by Starcraftfreak
Anyway, I don't think it's a good idea to use gamecache as an interface. How would you notice, that it got updated from outside. Then, writing to file is slow, even slower than GC already is. So it would be a narrow interface.

Can you suggest a better way of doing it?
12-20-2005, 11:30 AM#14
Starcraftfreak
Quote:
Originally Posted by qwertyui
Can you suggest a better way of doing it?
The question is what you want to do. And if you can accomplish creating the necessary applications with a reasonable amount of effort.

For smaller maps and mods, hacks in that order of magnitude are completely out of question. Bigger projects like FPS or PR may take that route, but it's still a painful way. Always keep in mind that with every update our app might be broken. Then you have to consider, that this is not the way, Blizzard wants you to mod. On battle.net this cries for problems.
12-20-2005, 01:41 PM#15
qwertyui
Hmmm
Do you consider a possibility of ladder for custom maps a big project or not?

I sure do :)

Imagine, if we could have a ladder for every single AoS, HeroSurvival and TD maps out there.

I think its a goal worthy of any effort.

So, can you suggest a better way of doing it?

All i need really is a way to get access from outside WC3 to some variables inside WC3 game, at the moment this game ends. Every path begins with first step.