IRC logs for #openttd on OFTC at 2023-03-31
⏴ go to previous day
01:07:16 *** WormnestAndroid has quit IRC (Remote host closed the connection)
01:07:17 *** WormnestAndroid has joined #openttd
01:38:47 *** bryjen has quit IRC (Quit: Leaving)
02:18:12 *** Wormnest has quit IRC (Quit: Leaving)
03:06:02 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:27:34 *** D-HUND is now known as debdog
05:12:02 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:03:40 *** sla_ro|master has joined #openttd
06:13:43 *** nielsm has quit IRC (Ping timeout: 480 seconds)
06:23:25 *** pickpacket7 has joined #openttd
06:23:25 *** pickpacket has quit IRC (Read error: Connection reset by peer)
06:23:25 *** pickpacket7 is now known as pickpacket
08:43:45 *** TrueBrain has joined #openttd
08:46:21 <TrueBrain> to answer the question: on what commit is it based 🙂
08:47:33 <dP> that question was answered before it arised :p
08:47:33 <TrueBrain> I love the account-name btw 😄
09:22:55 <TrueBrain> only if you look outside
09:27:51 <TrueBrain> no, wait 1 more hour
09:28:32 <petern> No, you give more useful answers I think.
09:33:27 <petern> Based on what andy writes, I've never used it.
10:04:00 <andythenorth> GPT is a great game
10:04:33 <andythenorth> if you want an advanced version of 'Microsoft Word Grammar Fixing" GPT is great
10:58:01 <pickpacket> petern: definitely food time now if you haven't eaten alread
12:37:50 *** GeorgeVB has joined #openttd
12:37:50 <GeorgeVB> NMLC> String code 'POP_WORD' has been deprecated and will be removed soon
12:37:50 <GeorgeVB> what should be used instead?
13:06:35 <LordAro> you'd need the old ottdcoop repo to know what #1848 is though
13:14:20 <TrueBrain> so it is replaced by `SKIP`, right? 🙂
13:17:44 <dP> iirc SKIP doesn't work in GS so idk what is it doing in nml
13:19:32 <dP> would be helpful in GS too
14:35:49 <petern> Hmm, new jockey wheels to fit but it's raining, boo
14:48:21 <dP> because I want to use strings with less parameters than requested
14:48:38 <dP> like if it's STRING4 I want to sometimes just do 2 and skip two more
14:49:09 <dP> rn I have to pass empty strings around instead
14:50:46 <dP> though I guess RAW_STRING will help greatly with that
14:56:54 <Rubidium_> it's not allowed for a GS to do STR_BLA: {STRING4} {STRING2} {STRING}? And then pass STR_FIRST: {NUM}? It needs to actually consume four?
14:58:13 <Rubidium_> as that's exactly what happens for STR_ORDER_TEXT where for a waypoint it just sets one parameter for the first string, and the second string gets defined at index 5 with a parameter in 6 & 7, and the third is defined at index 8.
14:59:23 <Rubidium_> or is it that the string validation is too pedantic and it wants you to set index 2-4 as well? That's something a {SKIP} in the sub string is not going to solve
15:08:56 <dP> Rubidium_: afiact, no, it needs to actually consume all, and #10492 added checks for that (was just ub before)
15:09:26 <dP> breaking half of gamescripts in the process 😆
15:10:41 <dP> oh, btw, if it's backported probably need to do something about that in 13.1
15:12:18 <petern> Yeah, I get GS errors now...
15:12:40 <Rubidium_> well, maybe it's as easy to solve as making the check slightly more lenient. So that STRINGN consumes at most N parameters
15:13:10 *** gelignite has joined #openttd
15:14:28 <dP> if not would probably need to remove the check for older api compatibility
15:21:05 <dP> though allowing less may cause new problems as params are flat outside gs so there is no way to check if it actually consumed as many as it was given
15:21:51 <dP> so if you accidentally consume less it will shift params for other strings
15:22:46 <dP> though it's probably the case already anyway
15:25:50 <Rubidium_> that's the whole point of STRINGN, it should just behave as if it has consumed the string and N parameters, regardless of the number of parameters that were actually consumed by the substring
15:26:07 <Rubidium_> if it doesn't, then that's a bug (IMO)
15:27:50 <dP> ah, you mean auto-skip if it consumed less?
15:31:57 <Rubidium_> yes, that's how it's supposed to behave
15:34:53 <dP> been a while since I tested it but I don't think it did that before 10492
16:27:23 <andythenorth> improved industry placement you say?
16:35:19 <glx[d]> Rubidium_: parameters are added based on the substring "parsing" and there's no padding if the substring consumes less than expected
16:40:26 <glx[d]> in most cases GS broken by the validation do the opposite, they consume more than expected
16:46:01 <glx[d]> example from BeeReward ```
16:46:01 <glx[d]> destination_string = GSText(GSText.STR_TOWN_NAME, destination);
16:46:01 <glx[d]> goal_text = GSText(GSText.STR_COMPANY_GOAL_REWARD, cargo.cid, this.wanted_amount, destination_string, this.reward);```
16:46:28 <glx[d]> with `STR_TOWN_NAME :{WHITE}{TOWN}` and `STR_COMPANY_GOAL_REWARD :Deliver {GOLD}{CARGO_LONG} {ORANGE}to {STRING}{ORANGE} for {WHITE}{STRING}{CURRENCY_LONG}`
16:47:13 <glx[d]> they added an extra `{STRING}` to discard the parameter from the first one
17:24:45 *** ChanServ sets mode: +v tokai
17:31:32 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
20:30:23 <Rubidium_> glx[d]: it feels really wrong to me if GS behaves differently for STRING4 if the string only uses two parameters, because then the whole STRINGN in GS is essentially pointless as you're going to count anyway you can just inject the right STRINGN token. Though that makes using different strings like we do in C++ for orders harder to accomplish
20:31:32 <glx[d]> that's why it's an error in the current validation
20:31:46 <glx[d]> param count must match
20:33:38 <glx[d]> should be easy to allow less than expected, with automatic padding
20:38:33 <glx[d]> in the bee reward case the parameters are 'SCC_ENCODED STR_COMPANY_GOAL_REWARD:cid:amount:SCC_ENCODED STR_TOWN_NAME:destination:reward'
20:43:03 <dP> hm, still missing something with FIRS...
20:43:23 <glx[d]> and because it's using {STRING} `destination` parameter is still present as param for the main string
20:44:03 <glx[d]> hence the extra {STRING} to discard it, but validating that is complicated
20:44:25 <glx[d]> it should have been STRING1 directly
21:19:30 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
21:36:42 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:37:24 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
21:46:42 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
21:47:16 *** WormnestAndroid has joined #openttd
21:47:19 *** WormnestAndroid has quit IRC (Read error: Connection reset by peer)
21:47:20 *** WormnestAndroid has joined #openttd
23:28:07 *** lobstarooo___ has joined #openttd
23:29:25 *** lobstarooo has joined #openttd
23:36:12 *** lobstarooo___ has quit IRC (Ping timeout: 480 seconds)
23:36:16 *** lobstarooo is now known as lobstarooo___
23:44:50 *** sla_ro|master has quit IRC ()
continue to next day ⏵