[WIP] DoxWars: The Mech Marine Strikes Back.

Discussion in 'Work-In-Progress Mods' started by BulletMagnet, June 2, 2014.

  1. LegionDarrath

    LegionDarrath Member

    Messages:
    105
    Likes Received:
    18
    Look at what you made me do Cola

    Attached Files:

    BulletMagnet, tatsujb and cola_colin like this.
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    You are such a hard worker.
  3. LegionDarrath

    LegionDarrath Member

    Messages:
    105
    Likes Received:
    18
    Thanks!
    Code:
    ERROR Invalid unit type! Type UNITTYPE_DoxWars not found.
    Is there a master list of unittypes? They looked an awful lot like the categories in FA but those weren't defined anywhere but here it doesn't seem to play nice if I just add a new one. Please tell me this isn't hardcoded.
    Last edited: June 3, 2014
    tatsujb likes this.
  4. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    It might be hardcoded to the engine... The layers are, the identifiers may as well... :l
    LegionDarrath likes this.
  5. lokiCML

    lokiCML Post Master General

    Messages:
    1,973
    Likes Received:
    953
    I believe is hardcoded into the server executable but it is deftly controlled by the server.
    LegionDarrath and squishypon3 like this.
  6. LegionDarrath

    LegionDarrath Member

    Messages:
    105
    Likes Received:
    18
    So there is hope that once we get full access to the server we would be able to change that? I guess I'll just edit all the units I don't want out instead of just editing the ones I want to keep. Ugh, more work.
    tatsujb and squishypon3 like this.
  7. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I believe these are bit flags, probably stored in 32 bit value. It's possible but very unlikely that the bits can be dynamically defined, most likely they are hardboard into the engine. If we're lucky maybe Uber can change this at some point.
    lokiCML and LegionDarrath like this.
  8. LegionDarrath

    LegionDarrath Member

    Messages:
    105
    Likes Received:
    18
    I just don't understand why they decided to go that way. Admittedly not a lot of mods would use it I guess but when adding new units and such it'd be incredibly useful. Thanks for the information anyway.
    squishypon3 and tatsujb like this.
  9. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    I'd just change the fabbers and factories to be not able to build anything else.

    Changing all units seems needlessly complicated.
  10. LegionDarrath

    LegionDarrath Member

    Messages:
    105
    Likes Received:
    18
    Of course, I just didn't think of that right away because I was busy ranting about the hardcoded unittypes.
    tatsujb likes this.
  11. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Actually you could do it even more easily by going to media/ui/main/shared/js/build.js and editing it, removing all units from it. This will remove all units from the ui so you don't need to do any work at all.
  12. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    I don't think that would effect the AI though (which is still handy to test against).
  13. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Stumbled on more information. New code from Galactic update; I still haven't made time to really read the diffs and there was so much new stuff...

    /pa/main/game/live_game/js/constants.js has a list of 46 attributes, so my 32 guess was wrong.

    /pa/main/game/live_game/js/events.js has a function that maps unit type indexes to bits in an array of four 16-bit values. It might be the JS representation of a 64-bit value; that plus endianess is the only reason I can think of for ordering the bytes backwards.

    On the upside, there are currently some slots open. Perhaps we could request say, Ext1-Ext4 for total conversion mods.
    lokiCML and BulletMagnet like this.
  14. masterdigital

    masterdigital Uber Alumni

    Messages:
    438
    Likes Received:
    833
    Unit types are 64 bit. They are not mutually exclusive. Eventually we might create the mapping from a JSON file, but until then it is hard coded in C++.

    Here is the list of currently used values:
    UNITTYPE_Commander,
    UNITTYPE_Fabber,
    UNITTYPE_Debug,
    UNITTYPE_Tank,
    UNITTYPE_Bot,
    UNITTYPE_Bomber,
    UNITTYPE_Fighter,
    UNITTYPE_Gunship,
    UNITTYPE_Transport,
    UNITTYPE_Teleporter,
    UNITTYPE_Scout,
    UNITTYPE_Structure,
    UNITTYPE_Mobile,
    UNITTYPE_Wall,
    UNITTYPE_Sub,
    UNITTYPE_Nuke,
    UNITTYPE_NukeDefense,
    UNITTYPE_Heavy,
    UNITTYPE_Artillery,
    UNITTYPE_Tactical,
    UNITTYPE_LaserPlatform,
    UNITTYPE_AirDefense,
    UNITTYPE_SurfaceDefense,
    UNITTYPE_OrbitalDefense,

    UNITTYPE_MetalProduction,
    UNITTYPE_EnergyProduction,
    UNITTYPE_Construction,

    UNITTYPE_Land,
    UNITTYPE_Naval,
    UNITTYPE_Air,
    UNITTYPE_Orbital,

    UNITTYPE_Basic,
    UNITTYPE_Advanced,
    UNITTYPE_CmdBuild,
    UNITTYPE_FabBuild,
    UNITTYPE_FabAdvBuild,
    UNITTYPE_FabOrbBuild,
    UNITTYPE_FactoryBuild,
    UNITTYPE_CombatFabBuild,
    UNITTYPE_CombatFabAdvBuild,

    UNITTYPE_Economy,
    UNITTYPE_Factory,
    UNITTYPE_Defense,
    UNITTYPE_Offense,
    UNITTYPE_Recon,
    UNITTYPE_NoBuild,
    lokiCML and wondible like this.
  15. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    For updates on DoxWars, see LD's [REL] thread over here.

    At this point, I'd normally request a locking, but there's useful knowledge to gain from @masterdigital's datadump. If some talented individual with thread-editing powers (read:a moderator) feels inclined to cut page two of this thread and splice it into a thread of its own, I certainly would not object.
  16. gunshin

    gunshin Well-Known Member

    Messages:
    790
    Likes Received:
    417
    So any updates on if this has changed yet?

Share This Page