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 the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  4. The results are out! Check them out.
    Dismiss Notice
  5. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  6. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  7. 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.

Hosting a map on GitHub - is it even possible?

Discussion in 'The Lab' started by Cheezeman, Apr 8, 2018.

Tags:
  1. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Yes.I use vscode to edit object data, it looks like this


    Code (Text):

    [AInv]
    _parent = "AInv"
    -- 可以取得物品
    DataD = 0
    [A000]
    _parent = "ANcl"
    -- 按钮位置 - 普通 (X)
    Buttonpos_1 = 0
    -- 按钮位置 - 普通 (Y)
    Buttonpos_2 = 2
    -- 效果 - 施法者
    CasterArt = ""
    -- 施法持续时间
    DataA = {0.0000, 0.0000}
    -- 选项
    DataC = {17, 17}
    -- 动作持续时间
    DataD = {0.0000, 0.0000}
    -- 使其他技能无效
    DataE = {0, 0}
    -- 基础命令ID
    DataF = {
    "faeriefire",
    "faeriefire",
    }
    -- 编辑器后缀
    EditorSuffix = "1 Q"
    -- 效果 - 目标点
    EffectArt = ""
    -- 热键 - 普通
    Hotkey = "Q"
    -- 名字
    Name = "技能模板"
    -- 施法距离
    Rng = {0.0000, 0.0000}
    -- 效果 - 目标
    TargetArt = ""
    -- 提示工具 - 普通 - 扩展
    Ubertip = {
    "1",
    "1",
    }
    -- 英雄技能
    hero = 0
    -- 等级
    levels = 2
    -- 种族
    race = "human"
     
    It looks like there are many Chinese comments. This is automatically generated by the tool. This comment comes from ui\WorldEditStrings.txt, just like the text you see in the WE.

    Before using it for the first time, you can use w3x2lni to extract data from your war3, such as English war3. You will see the English comments.
     
  2. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1
    The English document is already in my plan and you can see it in the near future.

    W3x2Lni provides GUI and CLI versions. This is the GUI version and it looks to work fine. You can drag the map into the GUI.The map I mean is including a w3x file or a directory.So lni is also a map.

    Maybe currently, the CLI version will be more friendly to English users.
    Code (Text):

    w2l mpq [war3_path]
     
    First run, extract the data file of war3.

    Code (Text):

    w2l obj [map_path]
    w2l lni [map_path]
    w2l slk [map_path]
     
    Convert your map to target format.Obj is the format that WE can open normally, and Lni is a git friendly format.
     
    Last edited: Apr 18, 2018
  3. Hotwer

    Hotwer

    Joined:
    Mar 10, 2013
    Messages:
    370
    Resources:
    0
    Resources:
    0
    Seems a bit weird to deal with data this way. Is it that you have only written the options that are not the default value? Also, do you have separate files for each unit/item/ability/buff?
     
  4. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,425
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Make sure to put your Wurst projects on github so we come closer to becoming an officially accepted language :)

    And yes, any project I make, I version with git. The better question qould be, what could I not put on github.
     
  5. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Nooooow I see. Cool! All this needs is an English translation and it'll be exactly what I'm looking for.
     
  6. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Ok so I just ran my map through your program and it seems I've misunderstood something. Three folders were created: /map/, /resource/ and /table/
    • /map/ contains all files in my .w3x (war3map.j, .wtg, .w3e etc).
    • /resource/ contains imported files like my custom loading screen
    • /table/ contains a nice text representation of all abilities, units, doodads etc. using your own text format LNI.
    So... all your program does is give a nice text representation of the objects (units, items, doodads) in my map? That's better than my current setup but it's not ideal for two reasons:
    1. Redundancy. You're keeping two versions of the same file.
    2. Security. If someone were to issue a pull request to your map on GitHub, how can you be sure that the object and your LNI text representation contain the same data?
     
  7. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Yes.When you export the war3 data file, w3x2lni generates a default value of lni. You may use it when editing lni. (w3x2lni will not use it, just for your reading.)

    No.Lni as a markup language, itself provides multiple directory features. But I didn't expect a reasonable rule of splitting the directory when converting w3* files to lni. And this feature may not be so useful.
     
  8. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1
    I don't understand what you mean. What are the "two versions of the same file"?
     
  9. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Is war3map.j and the trigger directory the two versions of the same file? This is the only one, but it is consistent with the behavior of the w3x format. Because w3x also retains both war3map.j and war3map.wtg/war3map.wct.
     
  10. Dracaratos

    Dracaratos

    Joined:
    Mar 20, 2014
    Messages:
    67
    Resources:
    0
    Resources:
    0
    @actboy168 Yes please to English version of that, exactly what I'm looking for
     
  11. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    No not that. For example, the file war3mapUnits.doo which contains all the unit and item data is in your program converted to the LNI files ./table/item.ini and ./table/unit.ini. But you also keep the file war3mapUnits.doo. So now you have two versions of the same file: you have war3mapUnits.doo, and you have your text representation (the two LNI files). Do you see how this could potentially be a problem?
     
  12. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1
    I don't think you know what war3mapUnits.doo is. It is a record of which units you have placed on the terrain editor. It should be the same part as war3map.j, not object data.
     
  13. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    True, my mistake. The files are actually called war3map.w3u for units and war3map.w3t for items. And I can't find them in the /map/ folder. Thank you for correcting me.
     
  14. actboy168

    actboy168

    Joined:
    May 1, 2012
    Messages:
    95
    Resources:
    1
    Tools:
    1
    Resources:
    1