Jump to content

[Solved] REPLACE_ACTION_TEXT as a Timer Solver?


cmorgan

Recommended Posts

1 hour ago, subtledoctor said:

This last component would be automatically installed, by default, with no user input.  

 

Right... and how do you force an installation of this in automated install tool ? By default, and my ass.

Should you understand, if the weidu update doesn't work, how the F do you think this is going to ? And yes, for that reason, there is:

weidu --noautoupdate

install time -parameter. All of them can be found under here. And yes, BWP/S  uses a lot of those things.

Link to comment
17 minutes ago, Jarno Mikkola said:

Right... and how do you force an installation of this in automated install tool ?

INSTALL_BY_DEFAULT is a standard WEIDU command. If a given automated install tool can't handle it, that would seem to be its problem.

Link to comment
1 hour ago, DavidW said:

INSTALL_BY_DEFAULT is a standard WEIDU command. If a given automated install tool can't handle it, that would seem to be its problem.

You are forgetting that one can use the READLN just as well, but as it's not recommended, a little co-operation with mod making and mod-using tools is a far more recommended approach than doing whatever the fuck one wants to do.

Yeah, and I am sure that INSTALL_BY_DEFAULT can be overcome... say with patching the shit out of it. Not that you want to see that, so doing the recommended approach has bonuses on multiple sides, not just the megamodings. 

If you ask ... why again, is that again, the cmorgan's situation was that his mod, used the READLN to set the value... and megamodings approach was to respond with a .txt insert to it, which LACKS ENTIRELY the ability to non-intrusively to change the settings in the mod setup. And that's one hell of an upkeep to keep if the component numbers change etc. ... and then it was requested on multiple fronts to refrain usage of the READLN -commands, and so we end up here, trying to work on more compatibility, NOT LESS !!! -thanks.

Edited by Jarno Mikkola
Link to comment

READLN (i) by its nature can't be autoinstalled, (ii) has a specific request by autoinstall designers to be eliminated, (iii) is part of an install method (interactive install) that WEIDU's current maintainer intends to phase out. None of that applies here. If you're writing an autoinstaller, by default it's your job to handle the actual WEIDU command set.

Link to comment
1 hour ago, DavidW said:

READLN (i) by its nature can't be autoinstalled,

1

Untrue. Or rather, complete and other bullshit.

What is true, is that it's very hard to maintain compatibility with, and truly insane to make multiple choice out of it, for a megamoding tool.

I don't have my SHSforums resources available to me, so I can't show you how one can install mods with READLN that get their inputs set by a .txt, but there is such code snips there.

(ii)And it won't be completely eliminated ever... or we won't have Widescreen mod at all, as it uses PATCH_READLN for it's settings, yes, the BWP/S has a special setup for that exact case... but doing so to the other 15 mods is not really reasonable, for the pure reason why it's there. As having an NPC talk x many times during a game is not really that important if you can't play with default screen resolution for example... that has say 8 million possible options.

Edited by Jarno Mikkola
Link to comment

 

57 minutes ago, Jarno Mikkola said:

Untrue.

The reason READLN can't be autoinstalled is because it can take arbitrary values - it doesn't come with any preset list of possible values. So any autoinstall engagement with READLN imposes a further restriction on possible values that's not inherently part of the logic of WEIDU.

57 minutes ago, Jarno Mikkola said:

Or rather, complete and other bullshit.

For heaven's sake grow up.

Link to comment
1 hour ago, DavidW said:

The reason READLN can't be autoinstalled is because it can take arbitrary values - it doesn't come with any preset list of possible values. So any autoinstall engagement with READLN imposes a further restriction on possible values that's not inherently part of the logic of WEIDU.

3

So what, if it takes arbitrary value... it can still be autoinstalled with. That's not the point. Why that is, is because the autoinstall tool can recover from whatever errors it's thrown into..and keep churning on installing the other components that won't error out.

It's just idiotic to do so, while the same thing can be done easier with subcomponent without a significant change in the overall effect. And yeah, the other inherited parts of the logic are generally set within the component code that is outside the READLN -function:

ACTION_READLN root
OUTER_WHILE !(IS_AN_INT %root%) BEGIN
  PRINT ~@11~
  ACTION_READLN root
END

Which sets the possibility to just be a number, in this example.

But that's not the hard part... allowing it to be any number, in an autoinstall tool, sets the tool to have a setting for the exact component that can set it to be any number, is hard to do, especially when there's 2000 other components that might as well want to use the option, while testing and shuffling their install orders etc. And the coding needs to be in a relatively short time scale.

The very same thing is true in a .ini setting. The .ini can be set to anything... set the "root" variable to be "n" in an ini, and the component won't install, but usually you don't. Again, not being the point.

Quote

For heaven's sake grow up.

Somehow you forsake the hint in my avatar being a devil... and being one of the smaller ones too. :D

By the way, you might want to check you passive aggressiveness somewhere, cause you just threatened me.

Edited by Jarno Mikkola
Link to comment

I suppose there is something to the post... and it is that "Democracy simply doesn't work." 🤣

In particular, the thought behind it is, that eventually, no matter how and what we do, there will always be those that go outside the proper frames of references and do what ever the cheese they ever want to.

Link to comment
2 hours ago, jastey said:

Is there supposed to be something in this post, @CamDawg?

Just having some fun with how the thread went from a very specific "I want a technical solution to provide a couple of options without READLN" from an author--which was solved, mind--to "you should customize everything and reorganize the mod entirely" in a few posts.

@Ardanis is right. Pick a couple of good options, leave some hooks in the tp2 for the power users, and spend your time on the creative side. The mod will be better for it.

Link to comment

Cool discussion, though - lots of good ideas. I can see building a mod from scratch that follows @subtledoctor's posting, especially for an NPC mod.  

@Ardanis and @CamDawg  I think are correct on the modder front - grab a simple set of ideas, build in a way for advanced users to tweak which content they want, and spend the time on developing new content. In Aran W  I enjoyed doing crazy stuff back in the day, trying to look for situations to use WeiDU in non-standard ways, because the mod was supposed to also be a "blog" about problem solving and choosing as a modder - and pushing stuff that worked in BiggDu that I saw coming through the testing stuff but didn't see out there in (many) other mods. That time has long since passed, and much of the code used is handled much better in simpler ways now. That leaves me free to just tweak what I have and write new content.

( @jastey, I suspect also that CamDawg is gently reminding me that I can get easily distracted from content by looking at cool shiny new-to-me coding ideas and spend weeks playing about with that - and that most of us have dress shoes older than my as-yet-unfinished mods "development time"...)

For this project, since I decided to move to SUBCOMPONENT and GROUP, I might even use several of these ideas, since I have spent a week rebuilding the portraits and timers into default->sc choice patched->sc choice patched. I still have to deal with the multiple .cre dual class, equipment, and weapon choices, so after a week working on content I can come back, poke around, and make a choice on some of the ideas presented here. The idea would be to make distinctions between "meaningless choices introduced by pushing overdone code examples" and "meaningful and targeted player options".

I still enjoyed (most of) the discussion, though probably it should have been under a separate post like

"Auto-Installers - Their Problem Or Ours?"

or perhaps

"Ways To Make Auto|Mega|Player|Multi|Ancient -Friendly Mods And Be Everything To Everyone While Coding A Mod" :D

Link to comment

...aaaaand back to "on topic" - a quick adjustment to the regexp, as the initial files are C-ARANJ and then the second drops the middle A (and I don''t trust my regexp-foo at all). I will gladly take my 6-to-2 reduction and run with it rather than the more efficient 6-to-1 reduction for an odd but specific reason -

when I mod I use "find in files" with NotePad++ and when I look for stuff that touches "C-ARN25J" or similar, I won't find this a match without including this in the find. The rest of the timer I'd look for with  RealSetGlobalTimer( and see what pops up before filtering, as a way to look for typos and mismatches across whatever I am looking for.

REPLACE_ACTION_TEXT_REGEXP C-ARANJ ~RealSetGlobalTimer("c-aran\(friend\|rom\|flirt\)timer","GLOBAL",[^)]+)~ ~RealSetGlobalTimer("c-aran\1timer","GLOBAL",5405)~

REPLACE_ACTION_TEXT_REGEXP C-ARN25J ~RealSetGlobalTimer("c-aran\(friend\|rom\|flirt\)timer","GLOBAL",[^)]+)~ ~RealSetGlobalTimer("c-aran\1timer","GLOBAL",5405)~

Link to comment
14 minutes ago, cmorgan said:

( @jastey, I suspect also that CamDawg is gently reminding me that I can get easily distracted from content by looking at cool shiny new-to-me coding ideas and spend weeks playing about with that - and that most of us have dress shoes older than my as-yet-unfinished mods "development time"...)

Not really. Just a general reminder to be true to what you're creating--Tweaks has 18 Brazilian options because it's a mod specifically made for players to fine-tune the game to their preferences. In an NPC mod--or a quest mod--your primary goal is to tell a story, and development should have that as a primary focus. More options are welcome, of course, but a well-written NPC will be better received than a less well-written mod with 18 install options, and your most precious resource (time) should be spent accordingly.

2 minutes ago, cmorgan said:

...aaaaand back to "on topic" - a quick adjustment to the regexp, as the initial files are C-ARANJ and then the second drops the middle A (and I don''t trust my regexp-foo at all):


REPLACE_ACTION_TEXT_REGEXP C-ARANJ ~RealSetGlobalTimer("c-aran\(friend\|rom\|flirt\)timer","GLOBAL",[^)]+)~ ~RealSetGlobalTimer("c-aran\1timer","GLOBAL",5405)~

REPLACE_ACTION_TEXT_REGEXP C-ARN25J ~RealSetGlobalTimer("c-aran\(friend\|rom\|flirt\)timer","GLOBAL",[^)]+)~ ~RealSetGlobalTimer("c-aran\1timer","GLOBAL",5405)~

REPLACE_ACTION_TEXT_REGEXP C-AR(\AN\|N25\)J ~RealSetGlobalTimer("c-aran\(friend\|rom\|flirt\)timer","GLOBAL",[^)]+)~ ~RealSetGlobalTimer("c-aran\1timer","GLOBAL",5405)~

 

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...