Jump to content

Is regexp case sensitive?


Miloch

Recommended Posts

I want to:

APPEND animate.ids ~0xe210 IC_FIRE_BEETLE~ UNLESS ~^0xe210~

But will this add a new entry if someone already has something at 0xE210?

 

If so, how do I avoid this? And is there a smarter way of doing this? For example, replace the existing entry if it isn't the same, and to append a new one if it isn't there.

Link to comment
I want to:
APPEND animate.ids ~0xe210 IC_FIRE_BEETLE~ UNLESS ~^0xe210~

But will this add a new entry if someone already has something at 0xE210?

 

If so, how do I avoid this? And is there a smarter way of doing this? For example, replace the existing entry if it isn't the same, and to append a new one if it isn't there.

Normally, yes, but WeiDU is generally a lot nicer about case sensitivity. If you wanted to be sure you could allow upper and lowercase e's:

 

APPEND animate.ids ~0xe210 IC_FIRE_BEETLE~ UNLESS ~^0x[Ee]210~

Link to comment

The whole thing isn't case sensitive anyway, so it doesn't matter at all.

 

Kick back with the BIG_LONG_COMMANDS_YOU_CAN_ADD_BUT_HAVE_NO_REASON_WHATSOEVER_TO_ACTUALLY_USE already...

 

Appending an entry where one already exists isn't going to hurt any normal player. The game doesn't care how many times you specify 0xe210, nor does WeiDU. UNLESS will keep you safe, but you might want to extend to 0xe210 IC_FIRE_BEETLE (or just IC_FIRE_BEETLE) if you're actually using the symbol for a script or something (vs. just nostalgia or whatever).

Link to comment

Just

COPY_EXISTING animate.ids override
 REPLACE_TEXTUALLY ~\(0xe210\) +.+~ ~\1 IC_FIRE_BEETLE~
BUT_ONLY

will suffice for replacing an earlier entry if you really want to. It can cause problems if a mod is uninstalled from mid stack and .bafs end up with no integer their ids symbol ought to compile to, so you probably don't.

 

How I Learned to Stop Worrying and Just Write 57872 in My Scripts Chapter 32767.

Link to comment
How I Learned to Stop Worrying and Just Write 57872 in My Scripts Chapter 32767.
Now, you can also Just Write 0xe210 in Your Scripts and not worry about the conversion (although I agree decimal is prettier). Er, Chapter -32768.

 

But yeah, numbers > symbols.

Link to comment

Huh. This is still making WeiDU gripe.

<<<<<<<<SuperHappyTime.baf
IF
 Global("ErrantNonsense","LOCALS",0)
THEN
 RESPONSE #100
SetGlobal("ErrantNonsense","LOCALS",1)
DisplayStringHead(Myself,~o hai i r a beetel now~)
Polymorph(0xe210)
END
>>>>>>>>
EXTEND_BOTTOM imoen.bcs SuperHappyTime.baf

 

/edit

Oooh, autoupdate missed my setup-testy.exe last time. Nevermind.

 

//edit

It still doesn't work in hexadecimal. I'm calling discrimination against those of us with sixteen fingers.

Link to comment

This has become rather trivial, since I think the first example worked, but as long as we're talking about stuff like this...

How I Learned to Stop Worrying and Just Write 57872 in My Scripts[/u] Chapter 32767.
Would this work, and would it recognize the equivalent hex entry if that's the native format?
APPEND animate.ids ~57872 FIRE_BEETLE~ UNLESS ~57872~

Oooh, autoupdate missed my setup-testy.exe last time.
I noticed something like this too, where once WeiDU auto-updated, it launched the last mod I had in my directory, a different one entirely than the one I'd launched, one I hadn't installed for ages and one that wasn't even in WeiDU.log. Of course, I can't reproduce it now, since it's already auto-updated... maybe next time.
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...