.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Digital Eel > Weird Worlds: Return to Infinite Space > Scenarios and Mods

 
 
Thread Tools Display Modes
  #1  
Old February 28th, 2009, 01:35 PM

IckyJoelIdeaVole IckyJoelIdeaVole is offline
Private
 
Join Date: Apr 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
IckyJoelIdeaVole is on a distinguished road
Default Quest problem

I've got a modding problem. What I'm trying to do is make it so that the Klakar require you to give up a valuable item before they'll trade with you, but I'm hitting a brick wall as far as how to implement it.

There doesn't appear to be any elegant solution. The best way would be to assign a tag to the items I want them to accept, but I can't find a way to remove the item afterwards. Sure, I could just have an event remove every possible item, but that'd make them get greedy if the player happens to have found more than one. I suppose what I want to do is make individual pages to check for each item, but every way I've tried to implement that has come out all buggy.

Also, I've somehow managed to break the Klakar entirely. Something I did makes them never greet the player at all, which is very upsetting since I'd already found a solution to that particular problem. I can't see why it would be happening now.

Anyway, here's what I've got. Anyone have any suggestions?

Code:
FLAG always

STAR 0
FLAG offmap
UVAR klakar_enc false
END STAR

CONDITION 0
TYPE preenc
STR0 klakar
END CONDITION

CONDITION 1
TYPE encounter
STR0 klakar
END CONDITION

CONDITION 2
TYPE uvar
STR0 klakar_enc
STR1 true
END CONDITION

CONDITION 3
TYPE haveitem
STR0 wp_projrail
END CONDITION

CONDITION 4
TYPE haveitem
STR0 sy_shieldelmx
END CONDITION

PAGE 0
REQ0 0
SVAR klakar_enc true
END PAGE

PAGE 1
REQ0 1
REQ1 2
REQ2 4
ACTN popup
MUSC music/vidcast.ogg
GFXP races/klakar.jpg 0
TITL Klakar Vidcast
TEXT We, the exalted Klakar, wish to parley with your humble race. Will you grant us the Marvelous Toy in exchange for an agreement of unrestricted and honorable trade between us?
YSNO 2 5
END PAGE

PAGE 2
ACTN popup endquest trade
MUSC music/vidcast.ogg
GFXP races/klakar.jpg 0
TITL Klakar Vidcast
TEXT Then it is my pleasure to invite you aboard our vessel and grant you a trade beacon, which you may use to contact us at any time.
REMV sy_shieldelmx
ITEM dv_klakbeacon
SVAR klakar_enc false
END PAGE

PAGE 3
REQ0 1
REQ1 2
REQ2 3
ACTN popup
MUSC music/vidcast.ogg
GFXP items/l_artif1.jpg 12
TITL Klakar Vidcast
TEXT The Mantle of Babulon may give you an edge in dealing with the Klakar, but its ancient power may be nearly spent. Do you wish to wear it during negotiations?
YSNO 4 -1
END PAGE

PAGE 4
ACTN popup endquest trade
MUSC music/vidcast.ogg
GFXP races/klakar.jpg 0
TITL Klakar Vidcast
TEXT Lord Babulon! Your presence here among us is most welcome. You will find your bartering agreement to be in perfect order. Here is a new trade beacon, as yours seems to be inactive.
REMV wp_projrail
ITEM it_mantle2
ITEM dv_klakbeacon
SVAR klakar_enc false
END PAGE

PAGE 5
ACTN popup
MUSC music/vidcast.ogg
GFXP races/klakar.jpg 0
TITL Klakar Vidcast
TEXT Then our trade vessel must remain closed to you. We invite you to reconsider our offer and return in the future.
SVAR klakar_enc false
END PAGE
  #2  
Old March 10th, 2009, 01:59 PM

clomaka clomaka is offline
Corporal
 
Join Date: Nov 2007
Location: Seattle, WA
Posts: 104
Thanks: 1
Thanked 2 Times in 2 Posts
clomaka is on a distinguished road
Default Re: Quest problem

Usually when i have that happen, i save off a copy of the quest, rip all the code out and part by part put it back in, testing after inserting each part.
  #3  
Old March 11th, 2009, 11:09 AM

IckyJoelIdeaVole IckyJoelIdeaVole is offline
Private
 
Join Date: Apr 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
IckyJoelIdeaVole is on a distinguished road
Default Re: Quest problem

Yeah, that's what I've been doing. Unfortunately, checking for a list of items and then removing only one of them isn't something that the base game ever does, so I doubt Fingers anticipated it in his code. Meaning of course that it's probably something that won't ever work the way I want.

I've done a bit of testing with using the THIF command as an alternative, so I might be able to at least partially accomplish what I wanted. The only problem is that'll make the Klakar accept *any* item, rather than a short list of valuables like I wanted. Also, I won't be able to notify the player of which item they want until after it's been taken, which will be a kludge to explain story wise.
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 12:35 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.