Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 [2]

Author Topic: Input re: loot mod  (Read 2398 times)

pappyodaniel

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Input re: loot mod
« Reply #15 on: March 04, 2023, 04:35:17 AM »

Still getting to know my way around the API and MagicLib etc. But making some progress.
Logged

Dadada

  • Captain
  • ****
  • Posts: 377
    • View Profile
Re: Input re: loot mod
« Reply #16 on: March 09, 2023, 01:58:40 PM »

:D
Logged

pappyodaniel

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Input re: loot mod
« Reply #17 on: August 14, 2023, 05:11:08 AM »

So, I read through as many mods as I could, and the API itself is still fuzzy to me. I can't quite figure out how to do things like:
  • inject more loot dynamically - I understand planet/ruins loot is determined when the sector is generated, but is there no loot drop mechanic to add more loot? Seems like there should be some kind of event-driven hook to grab onto, like eventService.on('loot_drop.ruins', ...)
  • navigate the API docs - they're pretty opaque. I was hoping for some examples of how to do common operations. Examples are incredibly scant

Overall not really sure I have time to finish this because learning the API is too time-consuming without solid examples. The artwork, mechanics, and everything else won't take long to finish, but the actual implementation is proving difficult.
« Last Edit: August 14, 2023, 05:13:18 AM by pappyodaniel »
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: Input re: loot mod
« Reply #18 on: August 14, 2023, 03:37:18 PM »

There are two ways to 'inject loot dynamically': one of them is to just add it to the drop tables, since loot is technically not determined until it's being looted; that determination uses a pseudo-random number generator based off the sector seed value. Which means that the contents of a given ruins set will always be the same if the loot tables remain constant. So, if you enable a mod that adds a droppable blueprint, for example, then your exploration has a chance to find that blueprint, even if the mod that adds it wasn't enabled when the sector was generated.

The other is to use whatever mechanic is used by the flashy person / old person with book bar events; both of those create new items that weren't previously present and add them to the loot from a specific thing.

(Or, if the goal is just more stuff in general, it might be worth grabbing an old copy of Starsector from when one of the skills actually increased rare loot drops, and seeing how that was implemented...)
Logged
Wyvern is 100% correct about the math.

pappyodaniel

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Input re: loot mod
« Reply #19 on: August 19, 2023, 08:10:31 AM »

Thank you for the input Wyvern, really appreciate it. I'm having another go at implementing based on a simpler setup which should also maximize compatibility.
Logged

pappyodaniel

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Input re: loot mod
« Reply #20 on: August 19, 2023, 02:44:12 PM »

I got the first item to show up in-game as a commodity. Meager progress, but encouraging.
Logged

pappyodaniel

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Input re: loot mod
« Reply #21 on: August 19, 2023, 03:07:40 PM »

Rare Gems and Antimatter Cell in inventory. Sneak peek.
Logged

Dadada

  • Captain
  • ****
  • Posts: 377
    • View Profile
Re: Input re: loot mod
« Reply #22 on: August 19, 2023, 03:20:14 PM »

Gems? Sounds like $$$ to me.  8)
Logged

pappyodaniel

  • Ensign
  • *
  • Posts: 18
    • View Profile
Re: Input re: loot mod
« Reply #23 on: August 20, 2023, 08:45:12 AM »

Yea they can just be sold off, but actually thinking each item will be consumable for a special effect. For example, gems can be "used" as in distributed amongst your crew to improve morale, which might improve CR/recovery by a little bit.

The idea in this mod is that everything has a purpose or use, or can just be sold off as extra loot. Kind of like you do with extra blueprints once you already know them.
Logged
Pages: 1 [2]