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)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Ragni

Pages: 1 [2] 3
16
Modding / Re: "The Infrastructure Mod" [TIM]
« on: June 02, 2017, 08:09:08 PM »
Update:
Finally got my "mod" to at least load with a custom rules command called from rules.csv.
Figured that mod_info.json needs entry about jars path.
Code
"jars":["jars/TheInfrastructureMod.jar"]

AND my project's java language level had to be set to 1.7 (1.8 threw an error about incompatible versions).

17
Modding / Re: How to run a new script from rules.csv
« on: June 02, 2017, 07:15:56 PM »
I am still facing same problem, I put my class all over the place, it still does not register.
stack trace:
Spoiler
Code
4868 [Thread-4] INFO  com.fs.starfarer.loading.scripts.B  - Loading class: com.fs.starfarer.api.impl.campaign.rulecmd.salvage.TimDoBusiness
4868 [Thread-4] INFO  com.fs.starfarer.loading.scripts.B  - Loading class: com.fs.starfarer.api.impl.campaign.rulecmd.newgame.TimDoBusiness
4869 [Thread-4] INFO  com.fs.starfarer.loading.scripts.B  - Loading class: data.scripts.tim.TimDoBusiness
4875 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - com.fs.starfarer.api.util.RuleException: java.lang.RuntimeException: Command [TimDoBusiness] not found in packages:
com.fs.starfarer.api.impl.campaign.rulecmd
com.fs.starfarer.api.impl.campaign.rulecmd.salvage
com.fs.starfarer.api.impl.campaign.rulecmd.newgame
data.scripts.tim

com.fs.starfarer.api.util.RuleException: java.lang.RuntimeException: Command [TimDoBusiness] not found in packages:
com.fs.starfarer.api.impl.campaign.rulecmd
com.fs.starfarer.api.impl.campaign.rulecmd.salvage
com.fs.starfarer.api.impl.campaign.rulecmd.newgame
data.scripts.tim

at com.fs.starfarer.campaign.rules.A.<init>(Unknown Source)
at com.fs.starfarer.campaign.rules.Rules.super(Unknown Source)
at com.fs.starfarer.loading.SpecStore.for(Unknown Source)
at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Command [TimDoBusiness] not found in packages:
com.fs.starfarer.api.impl.campaign.rulecmd
com.fs.starfarer.api.impl.campaign.rulecmd.salvage
com.fs.starfarer.api.impl.campaign.rulecmd.newgame
data.scripts.tim

at com.fs.starfarer.campaign.rules.A.getCommandClass(Unknown Source)
... 8 more
[close]

Spoiler
[close]

EDIT:
Ok, got it working, problem was that my mod_info.json did not have path to my jars  ;D
Code
"jars":["jars/TheInfrastructureMod.jar"]

AND my project's java language level had to be set to 1.7 (1.8 threw an error about incompatible versions).

18
Modding / Re: How to run a new script from rules.csv
« on: June 01, 2017, 08:21:18 AM »
I dunno if there are other blocking issues, but: Your command class needs to extend BaseCommandPlugin

Eh? Wow, I thought its BaseCampaignPlugin.
I'll try it out, thanks.

19
Modding / Re: How to run a new script from rules.csv
« on: May 31, 2017, 08:57:22 AM »
I used version Histidine suggested;

This is how it looks and I still get same error:
Spoiler


[close]


Hmm, I might have missed this step:
Code
Or you need to add the package it's in to "ruleCommandPackages" in settings.json.

I tried putting it in the right package (inside a .jar artifact):
Spoiler
[close]

20
Mods / Re: [0.8a] Degenerate Portrait Pack v1.0
« on: May 31, 2017, 07:36:20 AM »
10-15 are actually not that bad and would "fit";

I would actually use this mod if you could make a quality version of this and remove the weeb-ish variants.

Cherry picked:
Spoiler
[close]

21
Modding / Re: How to run a new script from rules.csv
« on: May 30, 2017, 07:36:27 PM »

Also you script should extend BaseCommandPlugin and either be in this package:
com.fs.starfarer.api.impl.campaign.rulecmd

Or you need to add the package it's in to "ruleCommandPackages" in settings.json.

Another potential issue: I'm not 100% sure whether a rule command compiled by the game will work or if it *has* to be compiled to a jar.

Alright thanks,
I will try to use the version Histidine mentioned and see about adding info to settings.json;
I assume it is the best way.
Can't imagine how it would be possible to smash something in libraries that my project is reading from (ok, i guess i figured out how, just to have my own Class replicated in similar package path).

22
Can confirm this. No rule commands are found no matter where I put them (even if I do the "ruleCommandPackages" in settings.json). I'll see if I can send you copy for testing.

*edit - sent via pm

Alright, fixed it - turns out it was using the wrong classloader.

Thanks- that's awesome! Any chance I could get a copy of the fixed build for modding purposes? (can't do too much on my end until I can make it to the main menu)

I think that I am encountering the same problem.
Being very new to modding SS (and modding at all), this was very confusing.

I described my approach here and what problem i encounter: http://fractalsoftworks.com/forum/index.php?topic=12526.msg212459#msg212459

23
Modding / How to run a new script from rules.csv
« on: May 30, 2017, 06:56:15 PM »
I am using "OpenCommDirectory" as an example;

When OpenCommDirectory is passed as value in rules.csv script column, it works - I don't know why.

I found OpenCommDirectory in libraries.
I wrote a new script under mods\modName\data\scripts.
I replicated code that was inside OpenCommDirectory.
My script class extends "BaseCampaignPlugin".

I pass my script class name in rules.csv where OpenCommDirectory was.

I run SS with my mod enabled and recieve an error:

Spoiler
[close]

I would like to understand how wrong is my approach.
Is it even possible? (maybe API does not support my approach).


My wish is to open a custom dialogue window from planet/station view where usually player can start trading or open mission board (which is OpenCommDirectory);
Once I am able to have my "own" dialogue window I can tweak it however I want and launch whatever CRUD scripts I want via "InteractionDialogAPI";

24
Documentation / Re: Custom Interaction Dialog Example
« on: May 30, 2017, 03:46:48 PM »
Mod is slightly out of date;

To fix the incompatability:

Add

Code
@Override
    public Map<String, MemoryAPI> getMemoryMap() {
        return null;
    }

to the AsteriodInteractionDialogPlugin Class

Method is not used by the mod, so it is safe to just return null.

25
Modding / Re: "The Infrastructure" [mod]
« on: May 30, 2017, 02:30:41 PM »
Update:
Experimented with rules.csv
Figured how to add a new option so it does not overwrite existing one
And a bit of $variable experiments

Still need to figure out how to create a completely new dialogue window for my own needs.


Spoiler
[close]

Update:
Described an issue I am facing here: http://fractalsoftworks.com/forum/index.php?topic=12526.msg212459#msg212459

Might be connected with bug: http://fractalsoftworks.com/forum/index.php?topic=5061.msg203328#msg203328

26
Modding / Re: "The Infrastructure" [mod]
« on: May 29, 2017, 05:46:46 PM »
Update:
v0.0:
Fiddled with IntelliJ, this thread is very valuable: http://fractalsoftworks.com/forum/index.php?topic=10057.0 ;
Loaded from sources the whole "Starsector\starsector-core" directory;
after ctrl+shift+f figured out that rules.csv file controls what shows up in planet view;
Got myself a starting point:

For now "Entrepreneurship" simply opens comms view (probably that is the reason for why I do not see vanilla comms view button)

Now to figure out how comms view "works" and how i can copy it and control scripts from there.

27
Modding / Re: "The Infrastructure" [mod]
« on: May 29, 2017, 12:06:56 PM »
I've heard the name "Soren" a lot, I can't quite recall why.
Thanks for the heads up.

28
Modding / Re: "The Infrastructure" [mod]
« on: May 29, 2017, 10:29:37 AM »
Thanks,
I did not know that SS has a discord channel.

29
Modding Resources / Re: Modding Tools & Resources
« on: May 29, 2017, 09:28:45 AM »
in the OP, this URL is decayed:
"Modding wiki - lots of good information in one place" ( http://starfarer.thegamewiki.com/wiki/Modding )

Is this the correct url now?:
http://starsector.wikia.com/wiki/Modding

30
Modding / Re: "The Infrastructure" [mod]
« on: May 29, 2017, 09:13:02 AM »
It is,
That is why I created MoSCoW scope and separated the most basic/wanted things;

Is text based scripts, triggering on in-game monthly basis, really that hard to implement ?
I need to learn how to manipulate the content visible when landing on vanilla planets/stations.
I need to learn what scripts to write, that trigger based on game state.

I think that is not too complicated for v1.0, I might be wrong of course, still yet to figure out what needs fiddlin';


Update:
v0.0:
currently reading https://s3.amazonaws.com/fractalsoftworks/doc/StarsectorRuleScripting.pdf
Hope that it is the right source of information at the moment.

Update:
Figured out how mod packaging works, thx to info here:
http://fractalsoftworks.com/forum/index.php?topic=4760.0
http://fractalsoftworks.com/forum/index.php?topic=5016.0

Pages: 1 [2] 3