• 0

    posted a message on Bank Compression

    Bank Files:

    4kB is limit for bank files of all player all together.

    If you want to use starcode to its full potential:

    First of all check size of each created string before compresion. You shouldn't try to create strings longer than 100 chars. (to avoid trigger execution time limit during decompresion) Check it by storing maximum value of value you are storing to get maximum string possible.

    Create as many of uncompresed strings as you need and compres them one after another.

    Remove "space" from characters used by starcode.

    Create one big string from all strings you have created adding "space" between them.

    Save it as a one string in bank file. (remember to name bank section with only one char becouse it takes space too)

    When you load just load this one big string and extract each of substing using "get word" function.

    Decompres each sting separatly and here you go.

    Remmember to decompres each string in separate trigger to avoid trigger time execution limit.

    When you create Bank file check it's size. Multiply it by amount of players. And you can check if you will fit into 4kB limit.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Library] STARCODE v1.4

    I think after using this trick there will be no better way to store variables in bank files. Maybe you can add support for it in your library?

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Library] STARCODE v1.4

    This Save library is awesome. I will use it for sure in my RPG.

    s3rius - if i'm right we can use 4kB for all banks for all players. So with 4 players we are limited to 1kB per player and aditional to this Bank files takes a lot of space becouse how they are created: xml file:

    <?xml version="1.0" encoding="utf-8"?>

    <Bank version="1">

    <Section name="0">

    <Key name="0">

    <Value string="6E2I(&gt;Z1Ekw-;.q5}vAPtM$v41&apos;mH?wWRfuTDhr@&gt;=tcyolzBx"/>

    </Key>

    </Section>

    </Bank>

    As you can see xml tags takes a lot of space. Aditional to it we can't create uncompresed strings larger than 100 char becouse of trigger execution time limit.... so we need to create aditional key for every 100 uncompresed chars so it takes more space for xml tags... i think of a solution to remove one character from base coding and use it as a separator so i can store multiple 100 char stings into one big string without geting to trigger time execution limit.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on Dynamic Equipment Container Model ?

    You can get to data editor values by "Catalog Field Values" And you can setup different value for each player.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How to get the remaining cooldown of an ability with trigger?

    To read a remaining cooldown for ability with trigger u need to use function "cooldown for unit ability" just like this this:
            Variable - Set ability cooldown = (Cooldown of "Abil/WarriorPowerAttack" For Current Hero[1] Warrior Power Attack)

    And in the place of string u need to put link to your ability. U can find it in data editor where u set up cooldown for your ability in link field. Problem is when u want to change this link u have to put it as Raw data. Editor bug....

    Posted in: Triggers
  • 0

    posted a message on How to target by mouse effect-target ability by trigger

    Hello, My problem is: I have a trigger launched on event UI - Player Any Player presses B key Down with shift Allow, control Allow, alt Allow and i've made action Unit - Order Current Hero[(Triggering player)] to ( Hero Adrenaline) (Replace Existing Orders) and it works becouse it's an effect - instant ability. But i want to make effect -target ability to be launched on the same trigger and be able to chose target by mouse.

    So i just want to make a effect-target ability to be launched on Key pressed but with a trigger.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Set Hero lvl problem

    I have problem with setting hero lvl after load.
    My code:

    Bank - Open bank "Save 1" for player 1
    Bank - Restore "1" of section "1" from bank (Last opened bank) for player 1 at (Point 001 facing 270.0 degrees) facing 0.0
    Unit - Set (Last restored unit) custom value (Experience level of (Last restored unit)) to 15.0
    General - For each integer i from 1 to 16 with increment 1, do (Actions)
          Actions
                  Unit - Create one (Unit type of item 1[i]) item in the inventory of (Last restored unit)

    Hero is created and all items for him are created too but lvl is not set...

    And when i read lvl value by:
    Variable - Set Hero lvl = (Experience level of Hero [16.52, 13.48])

    it reads it correctly

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.