stackcollision / GardenConquest

A new conquest game mode for Space Engineers
6 stars 7 forks source link

Make it easier to define custom classifiers #122

Open Devlah opened 8 years ago

Devlah commented 8 years ago

Hi there! I'm in the process of setting up a dedicated server using GardenConquest, and was poking around until I found the GCCConfig.xml file.

When I eventually scrolled down to see the class definitions and limits, it occurred to me that this seems to leave some room for server customization. So, I began to wonder; Can we add our own classifications (in addition to the ones already existing) by creating new entries in this config file, or are these static items that we can just tweak certain variables? I haven't toyed with it yet, but I suspect the latter is the more reasonable assumption to make.

Would it be possible to make it so that we could not only implement our own classifications, but also maybe use the config file to point to custom class icons as well?

For example: I would like to add a "Drone" classification. I suppose I could simply increase the limit of unlicensed ships allowed, but I would rather have a class that I could create and impose my own block count/type limitations. This of course, would require the existence of a "Drone" classifier block for the build menu. Which in turn, would need a corresponding icon art asset to be referenced. If it were possible to have the .xml file have an entry where this asset is located (such as a local path on the dedicated server or a URL), then it would make it possible for server admins to tweak the garden to their liking.

An example of such an entry might look something like:

 <Classes>
    <DisplayName>Mothership</DisplayName>
    <MenuArtAsset>MothershipIcon.ddr</MenuArtAsset>
    <MaxPerFaction>1</MaxPerFaction>
    <MaxPerSoloPlayer>0</MaxPerSoloPlayer>
    <CaptureMultiplier>50</CaptureMultiplier>
    <MaxBlocks>10000</MaxBlocks>
    <ShouldBeStation>false</ShouldBeStation>
    <BlockTypeLimits>
      <Limit>3</Limit>
      <Limit>1</Limit>
      <Limit>2</Limit>
      <Limit>6</Limit>
      <Limit>1</Limit>
      <Limit>6</Limit>
      <Limit>6</Limit>
    </BlockTypeLimits>
  </Classes> 

Of course, admittedly, I have no experience in modding SE yet, and have no idea if the API supports referencing art assets in this way, and for that I apologize. But I thought it might be nice to be able customize classes on a per-server basis. Being a fan of the Homeworld series of games myself, I was quite excited when stumbled upon the only server I've ever seen using this MOD. I remain even more enthusiastic now that I've been asked to administrate a server, and the powers-that-be like this game concept.

I look forward to future developments.

zrisher commented 8 years ago

For users to customize the existing classifier blocks and their icons, they'll need to add to / replace existing entries in CubeBlocks.sbc via an add-on mod. Currently this is completely possible and works, but I think it would be easier if we made a few changes: