Alias Conditions comparing with an other Alias Base infos ?

Post » Wed Jun 20, 2012 10:44 am

Hello all, i am failing to solve a little problem while trying to build dynamic questing.
I will try to explain it as clearly as possible.

The final in game situation:
The player will pickup an item in the quest. Lets call it ITEM_A
There is an item placed in one of my cells. Lets call it ITEM_B
ITEM_A and ITEM_B are two references of the same base item.

Now in my Quest,
I set an Alias to ITEM_A.

I want to set an Alias for ITEM_A...
BUT my "problem" start here because i can't make a direct link to ITEM_B. I need to be able to look at ITEM_A and find from it the ITEM_B.

What i have explored so far (without final success in thoses paths) for Conditions on Alias for my ITEM_B:
Try to do a GetIsID == Id of the ITEM_A.... but it seems can't use the "parameters (uses aliases)" checkbox for that condition
Try to use Keywords , but didn t found a way to compare keyword in my condition with the one of an other item/alias
Use FormList but became a dead end very fast for my situation (or missed something)

Anyone had similar Alias situation and a solution for me ?


More complete explaination of the whole thing:

I have 14 items that i placed as decoration in my Cell but disabled.
I am trying to create a Quest that will force the player to go recover a copy of each item in random radiant locations
When the player return an item, i will remove it from his inventory and enable the version already placed nicely in my cell.
The player will be able to complete the quest 14 times to recover each item and make the decoration complete.
Instead of writing 14 clone quests, i would like to take advantage of the great systems of the Game and CK to define my Alias "on the fly" with conditions each time picking a new item (that part is in theory working even if can t test yet) and somehow set the Second Alias depending on what is inside the First one.
User avatar
Sudah mati ini Keparat
 
Posts: 3605
Joined: Mon Jul 23, 2007 6:14 pm

Post » Wed Jun 20, 2012 6:32 pm

I'll try to help you, but I need to know how you plan on activating the initially disabled objects. Will you have an NPC who the player will return the radiantly placed items to? Or do you plan on making it so that when the player picks up the radiantly placed item it activates your disabled item immediately? Or, will the player need to place the found item in a container, or use some sort of activator to remove the found item and enable the disabled one? One other question. What are the items you are wanting to display? Are they static, Misc Items, Weapons or what?
User avatar
ShOrty
 
Posts: 3392
Joined: Sun Jul 02, 2006 8:15 pm

Post » Wed Jun 20, 2012 12:29 pm

It sounds like something based off the thief guild quest. So what you want to do is re-use the same quest alias for each of the 14 objects? I think there was a thread here yesterday trying to do something similar, and the person who asked decided to just use some scripting instead.

For you, since you know exactly which references you want, I'd suggest just making 14 forced aliases (or however many you need). Otherwise, to reuse the same alias, you'll need to use scripting.

The script would actually be pretty easy, just put scripts on each of the items that the player is supposed to find, and put in a FindClosestReferenceOfTypeFromRef inside an OnContainerChangedEvent.
User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am

Post » Wed Jun 20, 2012 7:04 am

You could have the quest receive the same 'strange parcel' object from from some dungeon 14 times. That will make the quest part easier.

The parcel could replace itself with the proper item at player pickup, when the player unwraps it.
You could even delay the unwrapping until the item was ready to place at the home decoration.
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Wed Jun 20, 2012 9:01 pm

The way i planned it,
-You pick the items in Radiant
-you will return to the Quest giver, talk to him,
I remove the item in your inventory , and enable the one in the cell.

They all are Misc items (The one the player can loot, and i placed the exact same base items on my questgiver cell)



I looked at the Thief guild, but the part i m having problem with is different for them.
there is a quest to recover items for Delvin and he place them , but he does alias for all of his 7 items, if i can avoid it that would be nice.


Maybe i can do an OnContainerChangedEvent on first item that do a forcedref of second alias ref to the base item type in my distant cell where i have the second ref ..
For that i need to set the second alias to optional at start and fill it on the event?
But not sure how to "find" the other reference to force it.
User avatar
Robert Garcia
 
Posts: 3323
Joined: Thu Oct 11, 2007 5:26 pm

Post » Wed Jun 20, 2012 9:34 am

The way i planned it,
-You pick the items in Radiant
-you will return to the Quest giver, talk to him,
I remove the item in your inventory , and enable the one in the cell.

Perfect, exactly what I needed to know. I'm at the office right now, but when I get home this evening I'll show you how I would do it. I will be doing much the same thing in my current project. I'll get back to you.
User avatar
Wayland Neace
 
Posts: 3430
Joined: Sat Aug 11, 2007 9:01 am

Post » Wed Jun 20, 2012 4:03 pm

Tried doing it with a forced ref and will have to test if working (long testings lol )
Sharing it if anyone need (unconfirmed need more testing tho :tongue: ) or anyone see improvements

My Alias:
Alias_DecorationItem  = the item player will lootAlias_PlacedDecoration = the item placed in my final cell

I have a Stage 0 that do :
; setup of the quest Placed ItemObjectReference newPlaced = kmyQuest.findPlacedVersion(Alias_DecorationItem.getRef())Alias_PlacedDecoration.ForceRefTo(newPlaced); move loot to the treasure markerAlias_BossContainer.getRef().AddItem(Alias_DecorationItem.getRef())

the kmyquest used in that stage contain :
Formlist Property pTDLRQ02PlacedDecorationList auto{AUTO: This is the Formlist of Decoration placed Refs in Library}ObjectReference Function findPlacedVersion(ObjectReference LootItem)	form baseThing = LootItem.GetBaseObject() as form	int total = pTDLRQ02PlacedDecorationList.GetSize()	int curIndex = 0	while(curIndex < total)		ObjectReference curRef = pTDLRQ02PlacedDecorationList.getat(curIndex) as ObjectReference		if(curRef.GetBaseObject() == baseThing)			return curRef		endif		curIndex += 1	endWhile	return NONEEndFunction



@balok ok, nice :) Share your way and will apply it if better than what i just explained =)
User avatar
Ilona Neumann
 
Posts: 3308
Joined: Sat Aug 19, 2006 3:30 am

Post » Wed Jun 20, 2012 11:38 am

OK, I may not be the best one to give you advice, but for me I usually go with what seems the simplest approach to me, mostly because I'm not that good with scripting. (But there's many ways to skin a cat.)

But I would probably just place my items where I want them to ultimately be displayed, and set them to initially disabled. I would give each one it's own Reference Editor ID and set an Object Reference in my script. Something like: MyPlacedItem12REF, and point your Object Reference to it.

Then I would set each of the radiant items up as you wish them to be done. (I haven't begun learning how to do all that yet, so I'll assume you can figure that part out. But I believe this is where you have to set an alias for each object you want to hide in the world via the radiant system?)

So, assuming you have the radiant part set up, I would then set my NPC's dialog Response Text with conditions set for the items that the player has found. In other words, your greeting could be:

“Hello Mr. NPC, I found one of your items.” And the NPC response could be, “Ah yes! That looks like Item number 12! Finding that was resourceful of you! I'll just take that from you, and here's your reward.” (or whatever, lol.)

But the point is that response would not fire unless the player had that specific item in their inventory. Then it's just a matter of setting your NPC's Papyrus fragment for that particular response to enable the placed item, and remove the one in the players inventory like this: MyPlacedItem12REF.enable() and use RemoveItem on your item in the players inventory.

Alternately, you could also just set a quest stage via that particular Response, and handle the removal and enabling in the quest stage fragment in the same manner.

You also might want script it to keep track of what items were found so that you can set a quest stage after all of them are placed to give your NPC additional dialog afterward. (I could walk you through the “old” way of doing this with the GECK, but I need to pick it apart and figure it out for the CK.)

But, if your way is working I always say don’t fix it if it ain't broke. Anyway, I don't know if this helps, but just another way to look at doing what you're trying to do.

Oh, one other thing. I don't know what Misc Items you're wanting to display, but something you might want to consider is making a static object out of the mesh for the Misc Item, that way they should be permanent, and cannot be moved or knocked around by wandering NPC's in your cell, and they shouldn't be affected by havock either. Or you could place a collision box around them. But that might be overkill, lol. For me though, I want my decorations to stay put.
User avatar
Danii Brown
 
Posts: 3337
Joined: Tue Aug 22, 2006 7:13 am


Return to V - Skyrim