R2-X2

Modders
  • Content Count

    45
  • Joined

  • Last visited

  • Days Won

    1

R2-X2 last won the day on November 21 2018

R2-X2 had the most liked content!

Community Reputation

32 Jedi Knight

2 Followers

About R2-X2

  • Rank
    Jedi Apprentice

Profile Information

  • Gender
    Male

Recent Profile Visitors

5,706 profile views
  1. I was just made aware of this mod, and that you are using my code for the repeating blaster attacks. Would have been nice if you had messaged me about it, but oh well, glad that I have inspired you on how to implement finesse. However, my code had a flaw, caused by scheduled scripts not persisting across some situations sometimes, such as savegames, party member changes or module transitions. Depending on how close your code is to mine, you might run into the same issue. I updated my mod a few days ago (after many years), where the issue has been fixed. You should probably check the new code (source and comments included in download just as before) and update your mod. Lastly, I'd appreciate it if you included in your description that the blaster attacks restoration is there because you included my mod (which I don't mind on principle, but I did state to ask me first) and provided a link to it, rather than just stating it as a feature of your mod and relegating me to a footnote.
  2. R2-X2

    Taris Store Nerfs

    I assume the Yavin store is not affected by this? That one always had a much better sell rate than the stores on Taris. (Yavin: 65%, Taris: 40%, Most of the rest: 25%)
  3. I believe I encountered an issue with the UTI editor: When trying to add an OnHit property, the parameters are not correctly shown: Seen here is the attempt to add an OnHit stun effect - I can set the DC, but not the duration and chance. (The additional DCs ("SK" in my localisation) were added by me and work flawlessly.) When instead editing a holdout blaster and its stun effect, the parameter values are shown correctly: And when editing the stunbaton 2, the DC settings are instead broken: I know this worked fine in KotOR Tool, but I would prefer being able to correctly edit these files in Holocron Toolset if possible. Any ideas?
  4. After far too long (years), I finally released an update to my Repeating Blaster Attacks Restoration mod. This fixes a bug that could cause your party members to get locked out of the bonus due to scheduled scripts not executing after a party change, module transition or savegame. It's a complete rewrite and should be very stable now. So if you were using the mod before, or considering it, I'd encourage you to update to the new version. :)

     

  5. Hey everyone! This took me several years longer to get back to than I had hoped. But now after many hours of struggling with KotOR's highly limited scripting functions, I have finally fixed it. The update has now been uploaded, enjoy.
  6. I found a different workaround. By adding an effect that can be checked for, but that does not seem to have any actual impact (and if working as intended, an absolutely miniscule one), I can check for the effect and prevent re-application after all. The effect in question being EffectMissChance with a value of 1 (meaning 1%) - which is actually incorrectly detected as "EFFECT_TYPE_CONCEALMENT", but alas that works anyway. I also checked, it does not clash with disguises being worn or stealth being active. Still it's really ugly, a shame I didn't find a better way. I wish we had some reverse engineer geniuses that patched the engine, like other lucky games found over the years. Thanks! Not just in combat. k_ai_master is run for basically everything. All the OnDefHeartbeat, OnHenHeartbeat etc. just call k_ai_master with the parameter of their respective portion (switch case) of the solitary function in k_ai_master.
  7. Ahh Discord servers, where useful information goes to die Thanks, I'll see what a search through the server can yield. And damn, very unfortunate, so that's off the board anyway. Do you know by chance which local booleans are used or available in KotOR 1?
  8. I'm thinking to perhaps run a cycle through a LocalNumber. I'd been trying not to do that because I was mislead by nwscript info saying there's only a range of 0 to 0, implying only one LocalNumber available, but it seems to be incorrect. However, information on what LocalNumbers are available is hard to come by, especially for KotOR 1. Edit: Actually, that just ends up at the same problems as a boolean again anyway.
  9. Yeah, kind of. It's a really strange issue I haven't encountered in other programming situations, since the NSS scripting in KotOR is extraordinarily limited even in its most basic parts compared to writing ordinary code. I have not tested non-party NPCs, though I assume they would be impacted by saves or module transitions of the player the same way.
  10. So the extra attacks effect is listed as "Invalid Effect" by the game, returning a 0. Great. I think globals wouldn't work, since the effect should apply to both party members and generic NPCs, so an arbitrary number of variables would need to be saved. @Salk Basically, I cannot control how frequently this gets called. I need it to be called at some point, but there isn't really a "game started, initialising" script to hijack. So k_ai_master is the best place, since that one runs for everyone. However, here we run into problems: I need to define a duration for the extra attacks effect. But I cannot know when the function will be called again, and the buff effect can stack with itself if applied before the previous ran out. So what I previously did, was to have the script do some things: - Set a local boolean (on the character) that will be set when the buff is applied, in order to not re-apply the effect when it has already been placed. It will only evaluate the other conditions if this one is set to not already on. - Call itself precisely after the buff expires, and knowing that the buff has expired, ignore the boolean when running this way. - Set the boolean back off when the script is being evaluated and no more repeaters detected. This works fine when you are within a module and don't change the party. However, when changing a module or party member, you can run into an issue: The boolean will be on the "buff present, don't run again" status, which usually isn't an issue since the cycle of re-checking itself has been started. But this scheduled execution of the function can get lost during module/character change, causing the boolean to stay stuck on the blocking status because the script that would repeat the evaluation and either restart the buff cycle or reset the buff to "off" when detecting different weapons never executes. It might just be a logical puzzle I haven't solved. But what I'm seeing are the following constraints: - 1. I have a script that gets called a random amount of times over a random span of time. - 2. I can set a local boolean for a character which may randomly be 0 or 1 by the time the script first runs (e.g. after a scene transition, savegame load, etc.) - 3. I only ever want one stack of the effect active, but the effect will stack with itself if called again before expiry. - 4. I cannot detect if the effect is active, nor can I remove it via script. -> My thought was to initiate a recursive script call cycle that is separate from the unreliable heartbeat / AI script runs. But I don't see a way to safely establish this in a way that persists across modules/savegames/party changes due to constraints 1 and 2.
  11. Checking a local boolean is exactly what the current version of the mod script does - which appears to work fine on the PC, but on other party members it will reliably break under certain unequip/save/load circumstances, which is why I want to get away from it. That looks really helpful, yes! Can I use it without the community patch? I'm playing on a non-english language and the handful of bugs in K1 have never bothered me enough. Edit: Ah and regarding not checking NPCs, yeah I'd put the baseitem check before the effect check. Now that said, the effect check hasn't worked for me yet, but I'm not done trying yet.
  12. Ah, this is unfortunate. So I can't even find a value via trial-and-error, since it might be different on someone else's device. Sadly my go-to program (RivaTuner Statistics Server) won't detect KotOR and so I can't limit the fps that way. Because sadly this code here does not appear to work: RemoveEffect(oCheck, eRepAtk); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRepAtk, oCheck, 4.5); The effect will never correctly be removed it seems, so the ApplyEffect just stacks the effect instead. And I haven't seen a "GetHasEffect" condition in the scripting functions either, sadly. I'm not sure if iterating through "GetNextEffect" every 3-6 seconds for every character on a given map would be very reasonable (I'll now proceed to test if it works in the first place). It should not be a very demanding operation, but with this engine... Any ideas/recommendations?
  13. So I am finally getting around to fix a long-standing bug in my little repeating blaster attacks restoration mod. Due to the previous implementation having an issue with variables malfunctioning upon area transfer and savegame loading (and the script admittedly not being very well written), I have decided to go back to a more simple implementation: Call it on every OnHeartbeat, and add the bonus for the duration of the heartbeat cycle if the weapon baseitem is correct. Now common knowledge is that the OnHeartbeat runs every 6 seconds. This is definitely incorrect, since when applying a buff that lasts for 6 seconds, it will quickly be applied twice and stabilise on that level. So I tried 3 seconds, and could observe that the bonus was never stacked, but had a short window of not being applied. This window varies from cycle to cycle but is below one second. So I would assume the OnHeartbeat runs every 3 to 4 seconds, but not regularly - or the application of effects that happen in the OnHeartbeat script only happens at certain intervals that don't perfectly line up with a say 3 or 4 second cycle. Does anyone by chance know more about this? Edit: When setting the bonus duration to 3.75, the bonus is mostly applied one time, as it should, but there are both times where it is not applied, and times where it is super briefly applied twice. Most confusing.
  14. Hi, R2-X2 here, I will get to this soon hopefully. Was pretty busy the last years and had the mind elsewhere (though it was always in the back of my head). But I think it can be fixed by coding it more crudely, merely using the OnHeartbeat and probably less than half the code, which would have the negative effect of allowing for weapon switches to malfunction for a few seconds (granting an extra attack still or not granting one for a moment), but I guess unless you actively try to game the system, that shouldn't be an issue.
  15. I can't seem to find a way to reliably have the script run the way I intended it. Will probably make it a 6-second buff triggered by the OnHeartbeat function, which runs every 6 seconds, as far as I am aware. This would cause more latency when it comes to changing weapons, but that's probably something that can be endured. How often do people switch their weapons anyway... As for not working together with force speed buffs, I have no idea what could cause this. I'm creating an entirely different effect that has one effect of the same type. Maybe there's something hardcoded in the game that prevents two sources to this effect from being active at the same time.