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 ... 186 187 [188] 189 190 ... 706

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

Cyan Leader

  • Admiral
  • *****
  • Posts: 718
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2805 on: May 23, 2016, 07:17:23 PM »

I haven't see much of the code on what calls for variants (or how the game spawns fleets for that matter, excuse my assumptions), but how possible would it be to control the percentages of variants?

Say a Hegemony fleet needs to low FP patrol fleet that may have Lashers. Say I have created 9 variants for the ship. Can I control the percentages right there (for example making it so 60% of it is variant 1,2,3,4,5,6, 30% is either 7,8 and 10% is 9) or would I have to create many copies of the files that are called in order to simulate a percentage? (as in having the fleet spawn code spawn one of these: Lasher A.var, Lasher A.var, Lasher A.var, Lasher B.var, Lasher B.var, Lasher C.var, in this case making Lasher A.var have 50% chance)

I know I'm being crude here, I just want to know how possible any of this is before I try jumping into the real thing.
Logged

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2806 on: May 24, 2016, 02:21:43 PM »

So, I just tested this and it's totally possible to make a weapon's type HYBRID or COMPOSITE or SYNERGY, such that it will only fit into that slot type or a Universal. Some questions:

1) Is this going to stick around? I assume this isn't A+ engine behavior from your perspective.
2) This is actually really cool for modding, because you can make funky edge-case weapons that can only be mounted in fancy slots. Another reason why fewer, more flexible slots become a viable design choice.
3a) How customizable are slot types from the modding end? If I were, say, doing a total conversion, could I rename and recolor them?
3b) How hard is it to hack in a new slot type?
Logged

kazi

  • Admiral
  • *****
  • Posts: 714
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2807 on: May 24, 2016, 02:54:14 PM »

Slot types are hardcoded iirc, which kind of takes 3a/b out of the question unfortunately
Logged

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 430
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2808 on: May 28, 2016, 08:45:37 AM »

how to use sprite.setBlendFunc() to make an inverse? I draw a white sprite using GL_SRC_ALPHA_SATURATE, GL_ONE_MINUS_SRC_COLOR but it seems unworkable
Logged
My mods


Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2809 on: May 28, 2016, 09:19:12 AM »

I haven't see much of the code on what calls for variants (or how the game spawns fleets for that matter, excuse my assumptions), but how possible would it be to control the percentages of variants?

Say a Hegemony fleet needs to low FP patrol fleet that may have Lashers. Say I have created 9 variants for the ship. Can I control the percentages right there (for example making it so 60% of it is variant 1,2,3,4,5,6, 30% is either 7,8 and 10% is 9) or would I have to create many copies of the files that are called in order to simulate a percentage? (as in having the fleet spawn code spawn one of these: Lasher A.var, Lasher A.var, Lasher A.var, Lasher B.var, Lasher B.var, Lasher C.var, in this case making Lasher A.var have 50% chance)

I know I'm being crude here, I just want to know how possible any of this is before I try jumping into the real thing.

You can do that, look in shipRoles in the .faction file - the number after the variant id there is a weight, which is a relative frequency compared to all other variants within that role.

1) Is this going to stick around? I assume this isn't A+ engine behavior from your perspective.

I honestly can't say. It's not a *bad* thing from my perspective, since it's not something that comes up in vanilla as a bug. However, I might make a change that would stop this from working, even entirely without realizing it, since I'm not sure what fortuitous chain of events is required to make this work out all the way through.

About the most I can say is I won't stamp it out on purpose. But if I had to knowingly break it while doing something related? Would totally do it.


how to use sprite.setBlendFunc() to make an inverse? I draw a white sprite using GL_SRC_ALPHA_SATURATE, GL_ONE_MINUS_SRC_COLOR but it seems unworkable

It really depends on what you mean by "inverse"; I'd suggest taking a look here:
https://www.opengl.org/sdk/docs/man/html/glBlendFunc.xhtml

This talks about the possible values and what they do, a good starting point.
Logged

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 430
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2810 on: May 28, 2016, 09:33:36 AM »

how to use sprite.setBlendFunc() to make an inverse? I draw a white sprite using GL_SRC_ALPHA_SATURATE, GL_ONE_MINUS_SRC_COLOR but it seems unworkable

It really depends on what you mean by "inverse"; I'd suggest taking a look here:
https://www.opengl.org/sdk/docs/man/html/glBlendFunc.xhtml

This talks about the possible values and what they do, a good starting point.

Well I have learnt about it and actually it does no help.
Inverse i mean...like pressing ctrl+i in ps
Logged
My mods


Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2811 on: May 28, 2016, 09:58:12 AM »

Inverse i mean...like pressing ctrl+i in ps

You might try GL_ONE_MINUS_SRC_COLOR, GL_ZERO. That's not going to look the same, though - what PS does is more involved than just a straight color inversion. Not sure offhand how you'd accomplish the same thing without using shaders.
Logged

Codyrex123

  • Ensign
  • *
  • Posts: 25
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2812 on: May 31, 2016, 11:12:07 AM »

No. But it can now have an animated barrel, a la the Assault Chaingun or the Thumper.


What about.... a beam weapon like that except it'l have a laser for each barrel, so it does hit long the side? i mean, i don't know what'l happen when they are sitting on top of each other, maybe extra damage to the bit they are hitting?
Logged

Deshara

  • Admiral
  • *****
  • Posts: 1578
  • Suggestion Writer
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2813 on: June 01, 2016, 03:30:29 AM »

i mean, i don't know what'l happen when they are sitting on top of each other, maybe extra damage to the bit they are hitting?

Um, do you mean it's a spinning barrel weapon with beams that fires every barrel at once like a tactical laser? What's the point of the spinning barrels then?
But spinning barrels aside, there's already a vanilla weapon that does basically that-- the large burst laser is a beam array and yeah getting hit by more than three lasers from the same weapon does three times the damage. I'm not sure what your question is, specifically
Logged
Quote from: Deshara
I cant be blamed for what I said 5 minutes ago. I was a different person back then

mord

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2814 on: June 01, 2016, 07:12:50 AM »

IS there a way to increase the max fleet size limit so i wont lose cr for having a huge fleet? I tried to go around in the settings but i didnt find anything what could be used for that.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2815 on: June 01, 2016, 09:30:32 AM »

IS there a way to increase the max fleet size limit so i wont lose cr for having a huge fleet? I tried to go around in the settings but i didnt find anything what could be used for that.
What version of the game are you playing? There is no longer a soft cap in 0.7.2a.
Logged
 

mord

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2816 on: June 01, 2016, 01:10:03 PM »

IS there a way to increase the max fleet size limit so i wont lose cr for having a huge fleet? I tried to go around in the settings but i didnt find anything what could be used for that.
What version of the game are you playing? There is no longer a soft cap in 0.7.2a.
If i remember correctly its 7.2a. I currently have 25 ships and i constantly get a message saying that my fleet is over the optional number ,uses more supplies and i get 15% cr punishment. Im maybe doing something wrong or missing something but i coulkdnt find anything useful on the net regarding this.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2817 on: June 01, 2016, 09:18:59 PM »

There's an SS+ setting that does that; it can be changed in SSP_OPTIONS.ini.
Logged

mord

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2818 on: June 02, 2016, 05:39:22 AM »

There's an SS+ setting that does that; it can be changed in SSP_OPTIONS.ini.
Oh my god, it worked! Thank you!
Logged

Toxcity

  • Admiral
  • *****
  • Posts: 561
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2819 on: June 02, 2016, 02:02:05 PM »

How do you control where ship.addAfterimage(...) spawns the afterimage? I have a system that spawns one that seems to change position each time it is used, even though the locX and locY variables are the ship locations corresponding x and y values.
Logged
Pages: 1 ... 186 187 [188] 189 190 ... 706