March 24, 2017, 10:44:45 AM

Author Topic: Got questions about Mod Development? Ask here!  (Read 6659 times)

Roboute

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #15 on: January 16, 2016, 04:53:38 AM »
Hello Namiraja,

I will try to answer your questions as best I can with the experience I've gathered making my mods. If something I say is incorrect, someone else please correct me.

As far as I know it is currently impossible to make workshops buildable on water, the vanilla well has most of it's functions hardcoded into the game.
The same goes for trying to make the vanilla well into a workshop. In my mod I disabled the vanilla well and just made a new well workshop that produces things, I just could not make it buildable on water (or require water as its location like the vanilla well)

I have not found ways to add new designation types, they all seem to be hardcoded to only allow the exisitng types.

New research stations, new research branches and the likes are all possible, I make use of them in my mods.
I believe it is also possible to make the prospector make/use different resources. I believe the glassworks mod makes use of that.
The smelter seems to be a bit different, but that seems to be more a matter of the game not handeling the list of producable items correctly inside the workshops.

Good luck with your mod, I hope these answers can help you.

Namiraja

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #16 on: January 16, 2016, 08:34:08 AM »
thanks for your answers :) I'm curious now about the research branches, I'm going to try this.

I believe it is also possible to make the prospector make/use different resources. I believe the glassworks mod makes use of that.
I know the glassworks mod changed the prospector to produce something else than silica, but that's the item that's always created, so I guess you just have to change the SilicaID in ProspectorSettings to a new itemID to change this; Same with MetalSliverID and weighted items, I guess you can change them.
But I'd really like to have another workshop, same kind of function but different input's and outputs (with random output like slivers), and still have the old prospector functioning. I'll just try it, when my current mod's done :>

Edit:
So I tried around a little bit. I couldn't make another prospector and keep the old one intact.
For the research stations/branches:
Did you just add more bluprintIDs? If so, the tinker workbench will unlock them at given time ... couldn't realy make independet ones for a different research station ...

For now I just used normal workshops. Will be enough for the mod, just not that fancy ;)

Edit2:
Okay, just saw it … indev added research.xml \o/
« Last Edit: January 16, 2016, 07:34:03 PM by Namiraja »

Rephath

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #17 on: January 24, 2016, 06:28:11 PM »
What file do I edit to make sure that items my gnomes are carrying are visible? It's been a problem. I've got sprites only for when the item is built or placed, but not when it is being transported.
« Last Edit: January 24, 2016, 09:58:56 PM by Rephath »

Namiraja

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #18 on: January 25, 2016, 12:13:41 PM »
items.xml has an optional  'HeldSpriteID' tag, that should do it.

Rephath

  • Sr. Member
  • ****
  • Posts: 337
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #19 on: January 25, 2016, 01:16:05 PM »
And if you don't use it it just uses the default sprite for the item?

Namiraja

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #20 on: January 26, 2016, 06:59:59 AM »
Okay, I just tried around a little.
When I only set the SpriteID, the sprite is used for all (stored, carrying ...). Setting HeldSpriteID in addition turned the item invisible while carrying for me, even though it should have had another sprite then (storage was still fine).
I'm afraid I can't help you ^^

Liru

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #21 on: January 26, 2016, 11:36:25 AM »
I'd like to add an item (bone needle) to the starting items but I can't seem to find a way that works, have you found a way?

Namiraja

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #22 on: January 26, 2016, 01:19:03 PM »
just copy the 'Mod Files' into your Mods folder, give it a name of your mod, and edit the Data/newgamesettings.xml. If you want to edit another mod to contain the needle, edit the given newgamesettings.

you can, for example, just add a crate with one yak bone needle:
Code: [Select]
  <Container>
    <Item>
      <ItemID>Crate</ItemID>
    </Item>
    <Offset>-1 1</Offset>
    <Contents>
      <Item>
        <Item>
          <ItemID>Needle</ItemID>
        </Item>
        <MaterialID>YakBone</MaterialID>
        <Quantity>1</Quantity>
      </Item>
    </Contents>
  </Container>

ItemID is Needle, to find the IDs, look into Data/Objects/items.xml
Material's found in Data/material.xml

Liru

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #23 on: January 27, 2016, 12:19:38 AM »
just copy the 'Mod Files' into your Mods folder, give it a name of your mod, and edit the Data/newgamesettings.xml. If you want to edit another mod to contain the needle, edit the given newgamesettings.

you can, for example, just add a crate with one yak bone needle:
Code: [Select]
  <Container>
    <Item>
      <ItemID>Crate</ItemID>
    </Item>
    <Offset>-1 1</Offset>
    <Contents>
      <Item>
        <Item>
          <ItemID>Needle</ItemID>
        </Item>
        <MaterialID>YakBone</MaterialID>
        <Quantity>1</Quantity>
      </Item>
    </Contents>
  </Container>

ItemID is Needle, to find the IDs, look into Data/Objects/items.xml
Material's found in Data/material.xml
I didn't really want to give another crate, but I can't seem to get the needle inside the crate with bandages in.

Namiraja

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #24 on: January 27, 2016, 01:48:44 AM »
okay, pretty easy, too :)
The point where bandages are added, it fills the crate (because no quantity is given). So just add your needle before:
Code: [Select]
...
      <Item>
        <Item>
          <ItemID>Helmet</ItemID>
        </Item>
        <MaterialID>Copper</MaterialID>
        <Quantity>1</Quantity>
      </Item>
      <Item>
        <Item>
          <ItemID>Needle</ItemID>
        </Item>
        <MaterialID>YakBone</MaterialID>
        <Quantity>1</Quantity>
      </Item>
      <Item>
        <Item>
          <ItemID>Bandage</ItemID>
        </Item>
      </Item>
    </Contents>

Tacyn

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #25 on: January 28, 2016, 03:10:41 AM »
items.xml has an optional  'HeldSpriteID' tag, that should do it.
From the way its used, I think HeldSpriteID only refers to items equipped in a main or offhand slot.

What file do I edit to make sure that items my gnomes are carrying are visible? It's been a problem. I've got sprites only for when the item is built or placed, but not when it is being transported.

Can you post an example from items.xml and the corresponding sprite entries from sprite.xml.
You might have the wrong sprite name.
If there are XXXFL,XXXFR,... versions, SpriteID needs one of those, e.g. XXXFL, instead of just XXX.

Setting HeldSpriteID in addition turned the item invisible while carrying for me, even though it should have had another sprite then (storage was still fine).
If this is the case, it should happen to the vanilla weapons as well.
I never noticed, but I am not certain.

Tacyn

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #26 on: January 28, 2016, 03:13:51 AM »
I'd like to add an item (bone needle) to the starting items but I can't seem to find a way that works, have you found a way?

This should work as well.

Code: [Select]
<ItemToGenerate>
        <Item>
          <ItemID>Needle</ItemID>
        </Item>
        <Quantity>1</Quantity>
<Offset>-1 1</Offset>
   </ItemToGenerate>


Namiraja

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #27 on: January 28, 2016, 06:23:28 PM »
Setting HeldSpriteID in addition turned the item invisible while carrying for me, even though it should have had another sprite then (storage was still fine).
If this is the case, it should happen to the vanilla weapons as well.
I never noticed, but I am not certain.
I was missing the Right+Left sprite; setting both turns the item visible while equipped.

Javada

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Got questions about Mod Development? Ask here!
« Reply #28 on: January 29, 2016, 10:13:23 PM »
Greetings,

I am trying to create a mod that will take care of our dearly departed Gnomes and am having trouble finding the Item or Sprite ID for Dead Gnomes.  I found the Corpse ID under the goblins setting but not sure if that also doubles as the ID for Dead Gnomes.  Any idea where I can find the ID?

~~ Javada

Ony

  • Newbie
  • *
  • Posts: 1
    • View Profile
Moding UI.
« Reply #29 on: February 03, 2016, 05:00:28 AM »
Is there a way to mod UI: add additional panels with info etc?
didn't found any info about it.

Is there actual ability to mod logic, calculation etc, not only sprites? if so is there any info or mod where i can look code to get which language used in it and what API is ?