HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A code to memory something....

01-24-2006, 07:07 PM#1
RaptorTeak
Hi there !

I was wondering about something... I'm making a map, in the finish stage, where players can have epic items from boss, etc... Well, but they're all saying "good map, but it takes time to kill all the boss, and whenever we got something we can not save it".

So I tried the first method to save chars : A game Cache. I made a -save command that saves the hero of the player typing it, and also a -load.

I tested it on Single Player, that was a success. Begin the game, loot some items, type -save, quit the game, reload the game and type -load, everything was working well. I said to everybody "Ok, save system working blabla....". But what have been my surprise seeing caches don't work on battle.net Oo....

So... My unique solution was totally killed. BUt then I remembered that I played a map where when you typped -save, the game displayed you a code to load at next game.
But unfortunaly I don't know how this code work, a strange code that could be decrypted by some trigger to make as result the heros with items, etc... you were having.

So... There is my question : Does anybody has ever heard of this code ? or any algorythm ? To save a unit with inventory ?

Thanks in advance for answers :).

RaptorTeak.
01-24-2006, 07:17 PM#2
Extrarius
You mean something like the Codemaker engine listed in the 'systems' forum inside this one?
01-24-2006, 07:40 PM#3
RaptorTeak
Yeah, it's exactly what i'm searching for !! Thanks for fast answer !

Problems :

I don't understand at all, when it's in text (well, just a little).
I don't know how to put it into my map :/

Sorry for my noobism, but I've never been habitued to this brutal code :p.
01-24-2006, 07:58 PM#4
Thunder_Eye
If you want a save/load code that you dont need to modify get Darky's
http://www.wc3sear.ch/index.php?p=Sp...1ac6090d9ea0cf
else you'll have to make your own
http://www.wc3campaigns.com/showthread.php?t=78969
01-24-2006, 08:02 PM#5
Vexorian
Darky's is incredibly easy to hack in. you just have to put a bunch of random characters and you get a hero instantly
01-24-2006, 08:24 PM#6
Thunder_Eye
Yeay I know and if you put it in wrong you might just get some items, though it works on custom heroes and items (not sure about the items)
01-24-2006, 08:27 PM#7
Vexorian
every save code can work with custom heroes and items.

Seriously I think that ZZZZZZZZZZZZZZZZZZZZZZZZ gave you a hero with great stats
01-25-2006, 05:28 AM#8
RaptorTeak
Thank you, I'll try by this way :).

Thanks for fast answers :).
01-27-2006, 01:45 PM#9
Thunder_Eye
Quote:
Originally Posted by Vexorian
Seriously I think that ZZZZZZZZZZZZZZZZZZZZZZZZ gave you a hero with great stats

Yeah probably ^^. though you have to add the custom heroes by your self on most of the other codes or am I wrong? I atleast didnt have to do that with darky's
01-27-2006, 02:55 PM#10
Vexorian
and why is that good anyways? that helps you only if you are too lazy, it makes the code much bigger, than when setting up the heroes manually which is easy like hell anyways. Not to count the increment in loading time just to make it detect things
01-29-2006, 05:40 PM#11
RaptorTeak
And, another last question (finally I'll get on the codemaker engine I think) :

How can I retrieve short names, or I dunno how they're called, for heros and items to add ?

Like :

call PoolAddItem(H,'Hblm') //Blood Mage
call PoolAddItem(H,'Hamg') //Arch Mage
call PoolAddItem(H,'Nfir') //Fire Lord

Where can I find that Blood Mage = Hblm, etc.... ?

Same question for items :p.

Thx in advance.
01-29-2006, 05:58 PM#12
Anitarf
In the object editor, press ctrl+D (or go to View->Display values as raw data) to see the four letter codes for custom objects.
01-29-2006, 06:23 PM#13
RaptorTeak
Okk Thanks :).

But I've seen that custom items have a "Ixxx" before their four letters data. Do I have to put them ? Or do I only have to enter the four letters ?

Also another problem...... :

I have entered heroes to save in the pool, but when I tried to save it, the game simply answered me "
(null)
(null)
"

So... I don't know what to do, because I'm sure to have entered correct values to heroes to save.

Maybe is it because I did this modification :

Instead of launch a spell called save on a unit, it's simply when a player type -save.
So I set the events to be "when a player writes -save" etc...
and I modified the custom script from

set udg_TemString =HeroSave_SaveHero( GetSpellTargetUnit())
to
set udg_TemString =HeroSave_SaveHero( udg_Heros[GetConvertedPlayerId(GetTriggerPlayer())] )

Where Heros is an unit array, and where Heros[2] = the picked hero of player 2, etc.... (this variable is working).