Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 242 243 [244] 245 246 ... 710

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

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3645 on: October 27, 2017, 02:16:19 PM »

Let me test some more, but thanks for the confirmation!

After more testing, works as intended! (I was checking for the stage after the one I should have been because it was defined incorrectly earlier in the file.)
Logged

King Alfonzo

  • Admiral
  • *****
  • Posts: 683
  • -- D O C T O R --
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3646 on: October 29, 2017, 12:07:39 AM »

Quick one:

Code
        stats.getCombatEngineRepairTimeMult().modifyMult(BUFF_ID, repairMult);
        stats.getCombatWeaponRepairTimeMult().modifyMult(BUFF_ID, repairMult);

For these ones, exactly what is it modifying? Is it modifying the length time it takes to fix a weapon (I.E. putting in a bigger number makes it go longer, smaller numbers make it go smaller) or is it modifying the rate at which the repairs occur (I.E. putting in bigger numbers makes it go quicker, smaller numbers make it go slower)?

Trying to make a shipsystem that instant fixes weapons and engines.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24123
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3647 on: October 29, 2017, 08:53:50 AM »

The length of time, iirc.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3648 on: November 02, 2017, 03:48:04 PM »

Any reason why this section of the CallEvent(RuleId, String RuleReference) method from an extension of TutorialMissionEvent.java wouldn't be invoked by this rule trigger?


Code block in CallEvent method:
Spoiler
        } else if (action.equals("returnFromEldrus")) {

            Global.getSector().reportEventStage(this, "sneak_end", Global.getSector().getPlayerFleet(),
                    MessagePriority.DELIVER_IMMEDIATELY, createSetMessageLocationScript(ancyra));

            Misc.makeUnimportant(eldrusContact, REASON);
            Misc.makeUnimportant(eldrusGuard, REASON);
            Misc.makeImportant(mainContact, REASON);

            updateStage(TutorialMissionStage.GOT_DATA);
[close]

Rules Script:

CallEvent $tut_eventRef returnFromEldrus

For reference, this section of the very same method works with this trigger:
Spoiler
      } else if (action.equals("endGetData")) {   // 'actions' are Rules.csv string entries.
                                                                             // stage below used in Reports.csv for mission dialogue.
         Global.getSector().reportEventStage(this, "eldrus_start", Global.getSector().getPlayerFleet(),
               MessagePriority.DELIVER_IMMEDIATELY, createSetMessageLocationScript(eldrus));   // Where map pings in message.
         
         Misc.makeUnimportant(dataContact, REASON);
                        Misc.makeImportant(eldrusContact, REASON);              // sets a yellow "!" over target entity to notify player
         Misc.makeImportant(eldrusGuard, REASON);                // of its importance.

                        Misc.cleanUpMissionMemory(dataContact.getMemoryWithoutUpdate(), "tut_");     // removes prefix from entity.

                        updateStage(TutorialMissionStage.GO_TO_ELDRUS);
[close]

Trigger:

CallEvent $tut_eventRef endGetData

Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24123
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3649 on: November 02, 2017, 03:53:25 PM »

One possibility comes to mind - which memory is $tut_eventRef set in? In the game's tutorial, it's set in the person's memory, which is the default memory used during the conversation. If you're trying to access it from outside a conversation with a person, it won't work because the eventRef is not there.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3650 on: November 02, 2017, 04:13:16 PM »

One possibility comes to mind - which memory is $tut_eventRef set in? In the game's tutorial, it's set in the person's memory, which is the default memory used during the conversation. If you're trying to access it from outside a conversation with a person, it won't work because the eventRef is not there.

Oh that is most likely the reason then, yes! I did not set that variable in the PersonAPI when I created the custom character in extended GalatiaGen. Thank you!

I didn't quite know where that variable came in and since the other invocations worked I made a couple assumptions. Can you explain why it is referenced by chance? Is it a safeguard against it being the wrong entity or something?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24123
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3651 on: November 02, 2017, 04:37:05 PM »

I'm not sure I understand the question. So let's cover hopefully everything :)

CallEvent needs to know what event's callEvent() method to call, so the event reference needs to be passed in to it.

As to where that reference lives - in person memory, entity memory, or global memory - that doesn't matter, it can be wherever you like. Putting it into global memory (Global.getSector().getMemoryWithoutUpgate(), iirc?) might make it easier to reference without worrying about being in the right memory context. For something you know there's only ever going to be one of, that'd be fine to do.

If there were multiple events going on at the same time - such as, delivery missions - then it makes sense to put it into the mission contact's memory. IIRC the delivery mission creation code avoids having multiple missions with the same contact, primarily for this reason.

Does that explain what you wanted to know?
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3652 on: November 02, 2017, 05:56:29 PM »

Does that explain what you wanted to know?

Yes! Also, confirmed solved  ;D That was what I had assumed earlier (that it linked Rules.csv and the .java file), I just didn't realize that event data was passed through the local memory of the entity rather than the global memory layer for the event. After that description I see why it's smarter to do it that way though. :)

For what I'm doing, global would be fine since the story branches but I don't any plans for concurrent storylines at the moment. That could change though, so may as well keep the convention.
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3653 on: November 06, 2017, 10:22:28 AM »

Question: ArmorGridAPI contains the armor, but good question, the method getArmorFraction  give 1 or 0 if the sprite of the ship is completely out of the grid? (Like the hammerhead, on the level of the right/left side of the bridge, per exemple)

Thank you o/
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: 24123
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3654 on: November 06, 2017, 11:00:35 AM »

The armor grid is set to "fully undamaged" everywhere, initially, and only goes down from that when damage is taken. The bounds of the ship only matter since they affect where on the grid damage is likely to be taken.

Does that answer your question?
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3655 on: November 06, 2017, 12:05:25 PM »

The armor grid is set to "fully undamaged" everywhere, initially, and only goes down from that when damage is taken. The bounds of the ship only matter since they affect where on the grid damage is likely to be taken.

Does that answer your question?

Yes, thank. Now i know than i need to remade my detection of damaged ship also (Before, i read just the contour for the performance, but if a ship with strange aspect can have 50% of the contour undamaged, argl :p)

EDIT:The script on this gif exemple, it is not perfect on performance, i try to decrease the cost. (Anyone of these sprite are the good, this is just for test)
Spoiler
[close]

And like i have not understand perfectly how work the armor. Now,  yes! Thank you very much.
« Last Edit: November 06, 2017, 12:08:26 PM 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.

Machine

  • Commander
  • ***
  • Posts: 114
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3656 on: November 06, 2017, 08:49:23 PM »

Asking this mostly out of curiosity... how does the game sort the weapons in markets?.

For player owned inventory it seems to be alphabetically (taking into account large weapons first, then medium, small, and finally fighter LPCs) if you use the sort function.

But that's not true for markets, meanwhile it does follow size, and if you can buy them. Weapons are not ordered alphabetically, or by what I thought applied, the number column.

Made a test giving a very large number to 2 large energy weapons, after a couple of tests (in order to get more variety of weapons spawning in the market), they appeared a first and last with other 2 weapons. Their order was not alphabetical, since it went D, M, C, P, nor was it by their number column, being actually 100001, 16, 15, 500000, neither was type since the weapons in the middle were missiles or their internal names, since 1 of the missile weapons was a cyclone reaper launcher ("cyclone") and it was in the middle of 3 weapons with the "TSC_" prefix.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24123
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3657 on: November 06, 2017, 08:59:57 PM »

Checked - looks like it's weapon size, then *stack* size, then weapon id. Not entirely sure why it'd do stack size, the reasoning for that is lost in the mists of time.
Logged

Iridescens

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3658 on: November 08, 2017, 06:30:57 AM »

@Alex,

There was a thread about game crash while saving. It also have wonderous link to RAM/VRAM req's.
A couple of days ago I've got my rig to 12GB RAM, 2GB VRAM 'cause I use a lot of mods. But I feel indignant to experience a crash because of VRAM (I triple-checked this with useShaders option of GraphicsLib) not while actually playing the game, but rather saving the game. I simply can't comprehend, how the hell that can even happen?!
If it is possible (read: won't take too much time/effort), could you explain WHY (what leads to this event) can SS crash out of VRAM while being "suspended" for saving. And is it possible to fix?
Thanks in advance!
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24123
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3659 on: November 08, 2017, 08:19:01 AM »

What leads you to believe it's VRAM related? That seems extremely unlikely, barring driver bugs and that sort of thing. To date, I don't think I've seen any reports of a game running out of VRAM while saving. That wouldn't make a whole lot of sense, unless it's a video card that doesn't have dedicated VRAM and instead shares RAM, like some integrated cards do.

It's possible that the useShaders option in GraphicsLib also makes the game use more regular RAM; not sure on the details there.


As far as the "during saving" crashes, I think there are two categories:
1) Someone playing with a bunch of mods and not raising the memory allocation, and
2) They raised the memory allocation, but there's a memory leak, so no matter what the memory allocation is, eventually it'll crash.

Given that I fixed a bunch of leaks in vanilla for 0.8, and there haven't been any (maybe one?) reports of a memory-related crash with just vanilla, and there have been a lot less reports of it with mods, I suspect that a specific mod might be involved in #2. Obviously can't guarantee that, can't guess which one it might be, etc.
« Last Edit: November 08, 2017, 08:20:51 AM by Alex »
Logged
Pages: 1 ... 242 243 [244] 245 246 ... 710