Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 254 255 [256] 257 258 ... 467

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17420
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3825 on: April 07, 2018, 10:05:19 AM »

Ah - it probably creates a fighter as part of the rendering process. I /think/ it just creates one and renders it a bunch of times instead of creating one for every fighter in the wing, but yeah, that's (probably) not hooked up to the source ship etc; it's not even trying to replicate that data structure etc.
Logged

MajorTheRed

  • Commander
  • ***
  • Posts: 245
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3826 on: April 10, 2018, 08:58:23 AM »

Quick question : what determine if a ship is available within a civilian market or a military market, as well as the level of commission needed? Is it its tag (civilian, carrier...)? Or based on a calculation of some of its caracteristics? Or its use in the faction file?
For example, in Disassemble Reassemble mod, the Taurus gunship (combat frigate, no tag, 1 medium and 4 small mounts) is sometime to buy in standard market.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17420
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3827 on: April 10, 2018, 09:06:38 AM »

... 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.
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 671
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3828 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 Anarchistic Defectors A fan-mod of Shadowyard.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17420
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3829 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: 671
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3830 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 Anarchistic Defectors A fan-mod of Shadowyard.

MajorTheRed

  • Commander
  • ***
  • Posts: 245
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3831 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 #3832 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: 17420
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3833 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 #3834 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: 375
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3835 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: 2846
    • View Profile
    • Bitbucket profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3836 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: 17420
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3837 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: 375
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3838 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: 17420
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3839 on: April 23, 2018, 09:08:37 AM »

Yeah, I'll keep it in mind!
Logged
Pages: 1 ... 254 255 [256] 257 258 ... 467