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 ... 254 255 [256] 257 258 ... 706

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1699694 times)

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3825 on: April 10, 2018, 09:56:54 AM »

 On my skin, i have that:

 "weaponSlotChanges":{
   "WS0001":{
    "angle": 0,
    "arc": 15,
    "locations": [
      59.5,
      -13.5
    ],
    "mount": "HARDPOINT"
   },

Everything work except one thing: The Location do not move.
A means to fix that? (Or i need to remove then reput a new weapon?)

Thank you!
« Last Edit: April 10, 2018, 10:00:47 AM by Snrasha »
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3826 on: April 10, 2018, 10:12:47 AM »

Yeah, location changes are not supported. Only angle/arc/mount/size/type are supported.

One way might be to have a "base" hull with both slots, and two skins which each removed one of them. Or have an empty DECORATIVE slot on the original hull, and then have the skin change it to be a different type - I think that might work as well.
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3827 on: April 10, 2018, 11:03:56 AM »

Yeah, location changes are not supported. Only angle/arc/mount/size/type are supported.

One way might be to have a "base" hull with both slots, and two skins which each removed one of them. Or have an empty DECORATIVE slot on the original hull, and then have the skin change it to be a different type - I think that might work as well.

Work perfectly, thank.
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

MajorTheRed

  • Captain
  • ****
  • Posts: 288
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3828 on: April 10, 2018, 02:17:18 PM »

... you know, I don't actually remember, and that code is different in the in-dev version. I think it's 5 fp or less and a frigate = can be found in the open market, but I also think there's some other restriction in terms of what "shipRole" it's found in, as defined in the .faction file.

I cross-checked appearance of ships in civilian market and it seems its closely related to ship roles in .faction files. Ships listed as combatFreighter, civilianrandom and other civilian types can be sell within civilian market. To follow my previous example, the Tauru is listed as combatFreighterSmall.

Anyway, thanks for you answer it gives me the right way to find what I was looking for.
Logged

gun&drink

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3829 on: April 14, 2018, 09:19:54 AM »

I don't know if this should go in here, but it definitely sounds like it doesn't deserve its own thread:
I was bored, browsing old threads and stuff, when I saw an sprite in a really old mod that catched my attention. Said sprite is not in use in any mod in the present, and the user owning the mod hasn't posted anything in the forums since 2012.
what is the etiquette when planning on reviving old mods/using old assets if the author is inactive for a very long time and you are unable to contact him? this is a very hypothetical question because a) I have yet to make a single modification in Starsector than works besides modifying config files, let alone making a ship from a sprite, and b) I haven't attempted to contact said author yet so I don't even know if contact is possible or not. I wanted to know the answer anyways just to have it in mind if I get a little better at modding and I decide to go for it
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3830 on: April 14, 2018, 09:27:53 AM »

Hey! If it's something you would put out as a mod for others to download, then you absolutely have to have permission from the person that made the assets. If you couldn't reach them, that'd be unfortunate, but would not make it ok to use someone's stuff.
Logged

gun&drink

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3831 on: April 14, 2018, 10:19:25 AM »

Hey! If it's something you would put out as a mod for others to download, then you absolutely have to have permission from the person that made the assets. If you couldn't reach them, that'd be unfortunate, but would not make it ok to use someone's stuff.
Thanks for the quick reply Alex
Good to know, I will try to contact him as soon as possible to know if he is interested in it, so that even if it takes a good while to respond I have a better chance than doing it in a few months
Logged

Inventor Raccoon

  • Captain
  • ****
  • Posts: 451
  • Digging through trash for a hydroflux catalyst
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3832 on: April 14, 2018, 05:08:34 PM »

I'm making a rulecommand that adds an officer to the player's fleet. Mostly fine and dandy, except for when it comes to two things I'm doing extra: giving the officer a special skill, and giving the officer a specific portrait. The first gives a NPE in the dialogue and the officer fails to be added, the second adds the officer but causes a fatal:null when opening the menu to assign/check officers. Code below, the commented-out stuff is what's currently not working. Would appreciate if someone could point out anything I'm doing wrong.

Spoiler
Code: java
package data.scripts.campaign.rulecmd;

import com.fs.starfarer.api.campaign.rules.MemKeys;
import data.scripts.campaign.ids.AEIDs;
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.InteractionDialogAPI;
import com.fs.starfarer.api.campaign.rules.MemoryAPI;
import com.fs.starfarer.api.impl.campaign.rulecmd.BaseCommandPlugin;
import com.fs.starfarer.api.util.Misc;
import com.fs.starfarer.api.characters.PersonAPI;
import com.fs.starfarer.api.characters.FullName;
import com.fs.starfarer.api.impl.campaign.ids.Factions;
import com.fs.starfarer.api.impl.campaign.ids.Personalities;
import com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent;
import com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.SkillPickPreference;

import java.util.List;
import java.util.Map;

public class AEAddSierraOfficer extends BaseCommandPlugin

{
    public boolean execute(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap)
    {
        final MemoryAPI localMemory = memoryMap.get(MemKeys.LOCAL);
        if (localMemory == null) return false;
        FullName name;
        CampaignFleetAPI playerFleet = Global.getSector().getPlayerFleet();
        PersonAPI officer = OfficerManagerEvent.createOfficer(Global.getSector().getPlayerFaction(), 3, false, SkillPickPreference.NON_CARRIER);
        name = new FullName("Sierra", "", FullName.Gender.FEMALE);

        //officer.getStats().setSkillLevel(AEIDs.SIERRA_SKILL, 3);
        officer.setRankId(AEIDs.RANK_SIERRA);
        officer.setPostId(AEIDs.POST_SIERRA);
        officer.setPersonality(Personalities.STEADY);
        officer.setFaction(Factions.INDEPENDENT);
        //officer.setPortraitSprite("graphics/portraits/sierra_portrait.png");
        officer.setName(name);
        //officer.getStats().setSkipRefresh(true);
        playerFleet.getFleetData().addOfficer(officer);
        return true;
    }
}
[close]

EDIT: Actually I think the skill thing not working is a fault elsewhere, still unsure about the portrait.

Also, is it possible to make a skill that's not available to the player?
« Last Edit: April 14, 2018, 06:17:09 PM by Inventor Raccoon »
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3833 on: April 22, 2018, 01:51:23 AM »

Is there a way to level an officer past whatever max level is defined in the settings (20, by default) without changing the officerLevelUp plugin in settings.json (which will cause conflicts if more than one mod wants to do this)?

I can define my own OfficerLevelupPlugin with an override for getMaxLevel(), and reference it using a different plugin ID in settings. But OfficerDataAPI.canLevelUp() still returns false once level 20 is reached, presumably because it always uses the plugin with the officerLevelUp key in settings.json.

@Inventor Raccoon: The portrait setting line should work and indeed other mods use it; I'm not sure why it's crashing. Maybe the portrait doesn't actually exist at the path... but it should just display a black rectangle even then.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3834 on: April 22, 2018, 06:09:48 PM »

Also, is it possible to make a skill that's not available to the player?

Offhand, I don't think you can.

Is there a way to level an officer past whatever max level is defined in the settings (20, by default) without changing the officerLevelUp plugin in settings.json (which will cause conflicts if more than one mod wants to do this)?

I can define my own OfficerLevelupPlugin with an override for getMaxLevel(), and reference it using a different plugin ID in settings. But OfficerDataAPI.canLevelUp() still returns false once level 20 is reached, presumably because it always uses the plugin with the officerLevelUp key in settings.json.

Hmm - if it's just putting an officer together for an AI fleet or whatnot, you could use the relevant methods to set that officer's skills and level directly. If it's for letting the player do it, then that's what the plugin is for, so no, I don't think so.
Logged

Inventor Raccoon

  • Captain
  • ****
  • Posts: 451
  • Digging through trash for a hydroflux catalyst
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3835 on: April 23, 2018, 08:29:07 AM »

Yeah, did some experimentation and it doesn't seem like you can make skills not appear unless they're tied to an aptitude. I wouldn't know where to suggest it but it'd be a nice addition, maybe as a tag of some sort or a column in skill_data.csv?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3836 on: April 23, 2018, 09:08:37 AM »

Yeah, I'll keep it in mind!
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3837 on: April 25, 2018, 04:02:37 AM »

Is there an equivalent of reportEncounterLootGenerated() for loot from salvaging an entity (including debris fields)? If not, could we get one (or probably better, a common method that handles loot from any source)?

There's a couple of things one might want to do with this, but the one I'd like to do is to scrub out things that should not be in loot for whatever reason.
A mod I'm helping which needs to have its content available nowhere outside of a specific region of space, and could use this as a fallback in case the "normal" prevention methods don't work.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3838 on: April 25, 2018, 09:49:16 AM »

There isn't, no. Might be a good thing to add; I'll see if I can manage that at some point.

(Any particular reason the "normal" prevention methods aren't working, or are they just not expected to be reliable in the first place?)
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3839 on: April 26, 2018, 08:04:29 AM »

That would be helpful, thanks Alex!

(Yeah, I was thinking it'd mostly be a "this turned out to have a bug, in lieu of waiting for a new Starsector release we'll write a script to work around it" kind of backup thing)
Logged
Pages: 1 ... 254 255 [256] 257 258 ... 706