1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Save/Load length problem

Discussion in 'Triggers & Scripts' started by BeLugh, May 15, 2007.

  1. BeLugh

    BeLugh

    Joined:
    Apr 14, 2007
    Messages:
    40
    Resources:
    1
    Maps:
    1
    Resources:
    1
    ok i am making a card game ^^ and anyone is complaining about building dekcs new all the time

    a deck has a size of 40-100 and more than 140 different items (->2 digits per item) they are limited by 1, 2 or 3 each

    does anyone of you hae an diea to shorten it that it is not 80-200 digits? (i twould be shorter using limit on itemtypes if mroe than 2 of the same kidn is used but maybe there is another possibility)
     
  2. Tooolbox

    Tooolbox

    Joined:
    Jun 23, 2004
    Messages:
    128
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    Well first off let me start by saying that I would like to have a look at your map (protected, of course) the concept simply intrigues me.

    As for your problem...

    If your card game works anything like MTG, in which you have 20 or so of the same type of card, you might save that type in an integer format (as in, number of this kind of card). That would shrink space rather than having 20 sets of 2 identical digits.

    Other options would be creating "sets", meaning that you have to have exactly 4 copies of a given card in your deck, which would quarter the required size. You could use 3 or 5 instead, which would subsequently alter the size.

    As for the mathematics of somehow cramming your stuff in the way you want it, you'll have to find a Save/Load Code guru. My guess is that shrinking the code will require you to limit your options, such as in the ways I suggested above.
     
  3. BeLugh

    BeLugh

    Joined:
    Apr 14, 2007
    Messages:
    40
    Resources:
    1
    Maps:
    1
    Resources:
    1
    http://pravec.de/lionsun/Warcraft 3 Card Game V0.68.w3x <- dl for newest version

    there are about 140 different item types you can buy and each item type is limtied to a maximum of 3 so you can not have mroe than 3 cards of a type
    i dont need crypting, itemtype=string i thought making it this way each item type will be 2 digits and the normal digit "-" will be exchanged with # or + depending on amount of the itemtype so that it looks like this:

    01+75-15#57+15+96#32#0f-fb#
    this is most efficient but looks weird lol ^^ but maybe there are better ideas

    it was in the lsit a few days ago, it is queued to be added again soon hehe

    the trigger is already finished like in the example hehe normally you use a card mroe than once so this was th ebest possibility ^^
     
    Last edited by a moderator: May 15, 2007
  4. Tooolbox

    Tooolbox

    Joined:
    Jun 23, 2004
    Messages:
    128
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    Huh that's quite a cool idea actually. My question is, do you have the option of picking all the cards? Or are there "rares" and whatnot? Cause the system you came up of (the +/-/#) would probably work great, and even allow players do edit their decks out of game, but if you had "rare" cards the players could stock up on all the good ones by changing their codes out of game.
     
  5. BeLugh

    BeLugh

    Joined:
    Apr 14, 2007
    Messages:
    40
    Resources:
    1
    Maps:
    1
    Resources:
    1
    no i mad eit that it checks the limit for it and gives only the allowed amount and when you load a deck your deck is cleared before that ^^ but i didnt test it in detail but it seems to work great
     
  6. Tooolbox

    Tooolbox

    Joined:
    Jun 23, 2004
    Messages:
    128
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    Ah, you misunderstand me.

    I don't know if you have some kind of Checksum in your code, but unless you do, people will be able to understand the simplicity of your methods and exploit them (if, once again, they are exploitable).

    I'm afraid I haven't checked out your map yet (did DL it and stick it in my WCIII maps folder though) so I'm speculating still.

    Card A is a powerful card.
    Card B is a weak card.
    Let's say "-" = 1, "#" = 2, "+" = 3.
    And your code is...
    Code (Text):
    0A-0B+...
    So you have 1 "A" card and 3 "B" cards. If your code is that simple, people could simply change it around so you have 3 "A" cards and 1 "B" card.
    Code (Text):
    0A+0B-...
    You see what I mean? If all the cards are equal, no problem really. Or if you have a method against this, no problem.

    Once again, complete speculation...but if you say, multiplied the number of cards by a set of numbers (so the outputs were less than 64) and outputted the values for Saving, and then re-divided the inputted Load codes by your set of numbers to produce the real amounts...an example:

    Save:
    Code (Text):

    Numbers of Cards: 1-2-3-1-2-3-1-2-3-1-2-3
    Coding Numbers:   9-4-5-2-6-8-7-3-5-2-9-7
    Output Numbers:   9-8-15-2-12-24-7-6-15-2-18-21
     
    Load:
    Code (Text):

    Inputted Numbers: 9-8-15-2-12-24-7-6-15-2-18-21
    Coding Numbers:    9-4-5-2-6-8-7-3-5-2-9-7
    Numbers of Cards:  1-2-3-1-2-3-1-2-3-1-2-3
     
    And of course when you Output the numbers use a Charmap to change them into a variety of letters, symbols, or even other numbers.

    Just seems like a way you could disguise the rather obvious -/#/+ method.
     
  7. BeLugh

    BeLugh

    Joined:
    Apr 14, 2007
    Messages:
    40
    Resources:
    1
    Maps:
    1
    Resources:
    1
    i know what you mean ^^ but the system asks for it how often it is allowed to put it in so you this system can also give you th epossibility to create loading codes when wc3 is not started so i see it as an advantage ^^ its not llike an rpg where you have to free something or would get a benefigt for example getting mroe gold ^^
     
  8. Tooolbox

    Tooolbox

    Joined:
    Jun 23, 2004
    Messages:
    128
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    That's exactly what I'm saying, with your way you *can* create codes out of game, if you want that you might even post up the 2-digit codes for every type of card so people can make their decks without booting up WCIII.

    The real issue is, are some cards better than others, and do you have to work to get those cards? If that's the case, you don't want to do that, and you should have better encryption. If all cards are equal, no problem.
     
  9. BeLugh

    BeLugh

    Joined:
    Apr 14, 2007
    Messages:
    40
    Resources:
    1
    Maps:
    1
    Resources:
    1
    no you dont have to work to get these cards only the god cards that will be implemented soon but you can get them easily you have to say password in battle to activate then ^^ they are fusions

    and i already thought about it too to publish the codes in the forum hehe that you can make your decks when not being ingame
    i would have implemented an encryption if it wouldnt be like that ^^
     
  10. Tooolbox

    Tooolbox

    Joined:
    Jun 23, 2004
    Messages:
    128
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    I understand now! I played your card game and completely fell in love with it, btw. I also own at it, which helps.

    I like making a deck with various low-level guys including Gryphons (tributes no matter what happens to them) Peons (tribute them and still have 2 skellies to fight) 2Ghouls (tribute food) 3Wisps (tribute food) Riflemen and the defensive Trolls. I tribute all of this to get the Abominations, Frost Wyrm, 2 Black Dragons and such that I have in my deck. I also have 3 Archers, 2 Demon Hunters and 3 Headhunters with the Morph cards for all 3. For spells and items I get Charm, Doom, Fan of Knives, Tranquility, Army Equipment, and a couple others.

    I also have an alternate deck I use that's more thrown together, but the theme, instead of tributing, is deck cycling to get the Large Blue Dragon combo (Dragonspawn + Dragonspawn Morph + Small Dragon Morph + Dragon Morph). The rest of the deck is mostly non-tribute monsters so I can easily put them out, with a few utility spells such as Charm, and Draw Point things like the Peasant trap and Quick Draw spell.

    Annnyway...if you haven't played his card game ignore that bit.

    But I do see why it's not necessarily a problem that you make decks in and out of game, the cards are all balanced nicely, more or less anyway.

    Suggestions for your map:
    Add more cards! Maybe some more actual traps, I mean you have Goblin Land Mines but maybe stuff like Sticky Traps or Teleport Traps, etc.

    Add "starter decks" that are pre-saved to one or two slots. Maybe have a "Human" deck and an "Orc" deck that focuses on units and spells from those races. That way people can get started playing real quickly. (The save/load code will of course help.)

    Oh and one more thing, change the name of your map. "WCIII Card Game" is just real generic.
     
  11. BeLugh

    BeLugh

    Joined:
    Apr 14, 2007
    Messages:
    40
    Resources:
    1
    Maps:
    1
    Resources:
    1
    its really ncie that you like my map so much hehe plz visit the forum (dont know if i am allowed to post the link here but its written everywhere in the map ^^)

    yes the growing communtiy is helping me to balance everything

    i will add moee traps untis and traps like you said soon (maybe in a few days)

    about the map name i will open a thread on forum about how and if it should be renamed

    i will create a trigger to load some decks hehe decksize 40

    btw pentalties for example for fan of knvis are heavily increased for next version so they are getting even mroe balanced ^^
     
  12. Tooolbox

    Tooolbox

    Joined:
    Jun 23, 2004
    Messages:
    128
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    Dunno if we're really allowed to turn this thread into a discussion of your map but whatever. :grin:

    I can prolly check out your forum, why don't you PM the link to me?

    Decksize 40 is probably a good standard, I just went for 50 the first time I made it cause you had those tooltips that said like 35% Green, 15% Red, 50% other and it was easier to simply take those numbers and halve them.

    And, I don't think Fan of Knives is really very unbalanced, since you can only have 1 per deck, you have an HP penalty and it kills your own units as well.