View Full Version : MOD Questions: haveitem and REMA
lexicat
August 25th, 2007, 10:00 PM
Hey there,
Does haveitem work with passengers? (i.e. ps_mukamb, ps_calamb, ps_esmerelda, etc.)
Does REMA work with these "items?" Is there some other way of getting rid of a passenger?
Thanks!
Lexicat
sgqwonkian
August 26th, 2007, 01:11 PM
I believe with the 1.22 patch REMV and REMA both remove passengers.
Without the patch there's no way to get rid of a passenger.
lexicat
August 26th, 2007, 02:19 PM
Thank you.
So does haveitem work with passenger items? Is there any way to create a condition that tests for the presence of a particular passenger, or passengers in general?
Cheers,
Lexicat
sgqwonkian
August 27th, 2007, 11:44 AM
The 1.22 patch makes it so that haveitem detects passengers. If you haven't downloaded the patch, there's no way to make it notice passengers.
To make it detect a specific passenger, have the STR0 for your haveitem be the name of the passenger file, such as ps_calamb, for example.
To make it detect passengers in general, you'd need to either do multiple haveitem CONDITIONs, or give all passengers a KEYS in common. Then have the STR0 for your haveitem be the same as that KEYS entry.
If you do go the KEYS route, bare in mind that the game won't randomly generate two items with the same KEYS entry. With the existing passengers, that's no problem, since they don't generate randomly, and are instead made specifically by quests. If, however, you wanted a randomly-occurring non-quest-derived passenger, the KEYS would matter.
lexicat
August 27th, 2007, 12:58 PM
Thanks Squidg,
So I do have 1.22. But I think something's not quite right with haveitem. The following quest snippet does not work in that it always gives PAGE 1, even when I have the Muktian Ambassador:
ideas?
CONDITION 0
TYPE explore
STR0 0
END CONDITION
CONDITION 1
TYPE haveitem
STR0 ps_mukamb
END CONDITION
PAGE 0
REQ0 0
REQ1 1
ACTN popup endquest break
TITL Greetings
TEXT The locals greet the Muktian Ambasador.
END PAGE
PAGE 1
REQ0 0
ACTN endquest
TITL Nothing
TEXT Nothing much happens.
END PAGE
Lexicat
sgqwonkian
August 27th, 2007, 02:23 PM
Is this an actual copy-paste, or just a paraphrase?
I ask because since PAGE 1 doesn't have a ACTN popup, I don't think it should be displaying anything to tell you it's triggered PAGE 1 instead of PAGE 0. I would think as written, nothing would happen rather than text showing up to tell you "nothing much happens".
If it's not triggering at all, the problem could be any of these:
a) the quest isn't listed in your game.ini file
b) you don't have a STAR block, or there's an error in the STAR block so it's not sure where to trigger
c) since you don't have a DISP 1 line before the ACTN popup line it could be displaying the text to somewhere other than where you're looking/expecting, most likely a planet exploration window behind whatever else is going on at the time.
d) the planet has been previously explored before you got the Ambassador
If it's actually displaying the text "Nothing much happens" and the code in your post is verbatim quote from a quest file, then I'm stumped. Hopefully somebody else will see something I've missed.
sgqwonkian
August 27th, 2007, 02:29 PM
It's possible the code in your post was a paraphrase to preserve cool secrets of your upcoming mod.
If that's the case, and it's definitely triggering PAGE 1 instead of PAGE 0 (and not just failing to trigger at all, either)...
...then the answer is probably a typo in the CONDITION block or REQ1 line of the PAGE block that you paraphrased, and that when you paraphrased you didn't make the typo.
Possibilities to look for:
It might not trigger (but may crash) if it says TYPE have item, TYPE Haveitem, haveitem {no TYPE code} or TYPE noitem instead of TYPE haveitem
It might not trigger if it says STR0 PS_MUKAMB, STR0 ps_muk amb, STR0 ps_muktamb, PAR0 ps_mukamb, etc instead of STR0 ps_mukamb.
If there's a different new passenger you're using instead of the original ps_mukamb, make sure you have it named consistently in this quest, the game.ini and the the items own .ini file. (I had some things that wouldn't run in a mod once because they were spelled sgqwonk in one place and sqgwonk in another).
It wouldn't trigger if it says REQO not REQ0.
It wouldn't trigger if the paraphrased code above doesn't accurately reflect the PAGE order and you actually have the PAGE 1 block above the PAGE 0 block. It would do the first PAGE it qualified for and stop looking for other pages once it got to the ACTN endquest.
lexicat
August 27th, 2007, 04:53 PM
Wowie! what a bunch of answers. you have correctly guessed that I am leaving juicy details out.
Actually the code I posted works (I noticed that, for example, the Even Weirder Worlds mod is pretty strict about using popups for the ACTN command, but that the basic Weird World quests aren't necessarily.) When I test my mod, whether using popups or no popups, I only and always get the last PAGE. In fact an even simpler quest, in which I attempted to make a single PAGE event occur upon the single CONDITION for TYPE haveitem with STR0 ps_mukamb fails.
My STAR blocks are present, and there's no typo in my CONDITION blocks as you have so thoroughly and helpfully suggested. :}
I am beginning to conclude that haveitem does not in fact test for passengers.
But let me set it down for thisaways: can you make a working quest with a condition testing for a passenger using haveitem?
Lexicat
sgqwonkian
August 27th, 2007, 05:36 PM
Well, I'm not using the 1.22 patch (it makes my mac crash... Fingers and Ed are still trying to figure out why), so I might not be able to for reasons other than what you're facing.
Looking at the files from quests in the main game, i see that there are a few TYPE noitem conditions looking for the absence of ps_mukamb etc (ally_muk.ini for example).
So, you could reverse the order your PAGEs, set the new PAGE0 to trigger off TYPE noitem and TYPE explore, and make sure you include ACTN endquest in it. Then, in a later PAGE entry, you set up just a TYPE explore requirement. That should give the same net result, being that they'll only get that second page if they do have the ambassador.
sgqwonkian
August 27th, 2007, 05:40 PM
...or, you could alter the quest that gives the Ambassador in the first place. Add to it a line of "SVAR mukamb yes" just above or below "ITEM ps_mukamb".
Then in the quest you're trying to make, set a CONDITION block with
"TYPE uvar
STR0 mukamb
STR1 yes"
So there's a couple different ways to work around it.
lexicat
August 27th, 2007, 08:33 PM
What a swell space alien!
Thank you!
Lexicat
lexicat
August 27th, 2007, 10:30 PM
Ok, so noitem works with passenger items, but haveitem does not seem to.
On a more general note, I wonder if it is possible to add an operator to negate any condition. (or just to insure that every condition function has an inverse function)?
Thanks again, squidge!
Lexicat
Phlagm
August 28th, 2007, 01:02 AM
Lexicat, you can't negate a condition. YOu're just kind of stuck with what's already there.
and yeah, haveitem won't work with passengers. Even worse, it won't work with items you install!
-Jeremy
lexicat
August 28th, 2007, 12:14 PM
Well boo!
But thanks for the feedback, Phlagm. So on further exploration it seems that noitem is likewise insensitive to passengers. I guess going the user variable is the way to go.
Lexicat
sgqwonkian
August 29th, 2007, 07:18 PM
Weird that noitem ignores passengers.
It's used in ally_muk and ally_zorg in the main game, clearly intending it specifically to detect passengers or the lack thereof.
I guess that's officially a bug then, heh?
Phlagm
August 30th, 2007, 02:44 AM
Hmm....perhaps not. I thought I remembered that being one of the issues, but now that you mention it, I think you're right, and that it will detect passengers after all.
Sorry about that. I still am pretty sure it won't work on installed items. I was intending to make lots of interesting stuff based on having things installed on your ship....like an eel drive that will abandon you to join the space whales, for example.
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.