Jump to content

Need some ideas


Recommended Posts

Hello,

 

I am building a mod for Halloween which has tarot/fortune telling cards, which is fun because I have almost no experience with (insert whatever is needed here).

 

My question is how should I go about this. It is a set of 21 cards and each card can only be chose once to represent past present future.

 

The player would go to a see a witch Khajit for their fortune and I have the Khajit able to give random yes/no answers but not sure how to go about it for the cards.

 

What are your thoughts? I can research how to do it if I know what I need to do.

 

Thanks.

 

Link to comment
Share on other sites

Cool idea. This will require some scripting. Here's a tutorial to get you started if you don't already know how to script: http://www.cipscis.com/skyrim/tutorials/beginners.aspx

 

For the actual script, you can put it in a dialogue fragment, and I would make a new formlist and put all of your cards in it.

 

Here's an example script that gives 3 unique cards to the player:

 

Formlist Property TarotCards Auto 
Actor Property PlayerRef Auto 

Form Card1 = TarotCards.GetAt(Utility.RandomInt(0, 20)) 
Form Card2 = TarotCards.GetAt(Utility.RandomInt(0, 20))
Form Card3 = TarotCards.GetAt(Utility.RandomInt(0, 20))
    
While Card2 == Card1 
    Card2 = TarotCards.GetAt(Utility.RandomInt(0, 20))
EndWhile 
    
While Card3 == Card2 || Card3 == Card1 
    Card3 = TarotCards.GetAt(Utility.RandomInt(0, 20))
EndWhile 

PlayerRef.Additem(Card1, 1)
PlayerRef.AddItem(Card2, 1)
PlayerRef.AddItem(Card3, 1)
Link to comment
Share on other sites

Thanks so much! You are awesome. I will try this.

 

On another note, would it be possible to show the card to the player instead of giving it to them like on a table or on the screen?

Edited by Adventurer1111
Link to comment
Share on other sites

No problem. Yes that's possible. If your actor is in front of a table, I would just place all 21 cards in 3 spots on the table in the creation kit. Check the initially disabled box on each card so that they're all invisible from the start. Put all the card object references in spot 1 in one formlist, all in spot 2 in another formlist and all in spot 3 in a 3rd formlist. Make sure your cards are in the same order in all 3 lists. Then in your script you can do this:

 

Formlist Property Spot1Cards Auto ;filled with all card refs in spot 1
Formlist Property Spot2Cards Auto ;filled with all card refs in spot 2
Formlist Property Spot3Cards Auto ;filled with all card refs in spot 3
Formlist Property CardsUsed Auto ;empty formlist

Int Card1Index = Utility.RandomInt(0, 20) 
Int Card2Index = Utility.RandomInt(0, 20)
Int Card3Index = Utility.RandomInt(0, 20)

While Card2Index == Card1Index 
    Card2Index = Utility.RandomInt(0, 20)
EndWhile 

While Card3Index == Card2Index || Card3Index == Card1Index 
    Card3Index = Utility.RandomInt(0, 20)
EndWhile 

ObjectReference Card1 = Spot1Cards.GetAt(Card1Index) as ObjectReference
ObjectReference Card2 = Spot2Cards.GetAt(Card2Index) as ObjectReference
ObjectReference Card3 = Spot3Cards.GetAt(Card3Index) as ObjectReference

Card1.Enable()
Card2.Enable()
Card3.Enable() 

CardsUsed.AddForm(Card1) ;adds cards to formlist so we can disable them later.
CardsUsed.AddForm(Card2)
CardsUsed.AddForm(Card3)
Then later, maybe in another dialogue script fragment, you can do this to make the cards invisible again:
Formlist Property CardsUsed Auto ;filled with cards previously used

ObjectReference Card1 = CardsUsed.GetAt(0) as ObjectReference
ObjectReference Card2 = CardsUsed.GetAt(1) as ObjectReference
ObjectReference Card3 = CardsUsed.GetAt(2) as ObjectReference

Card1.Disable()
Card2.Disable()
Card3.Disable() 

CardsUsed.Revert() ;clears formlist 

Don't forget to add and fill the formlist properties in your scripts. Hope that helps! For more scripting reference you can go here: https://www.creationkit.com/index.php?title=Category:Papyrus

Link to comment
Share on other sites

I can see that you're in good hands with dylbill, already. I'd just like to say that you have a really interesting idea going there and wish you all the best with it!

 

that you're using the Khajiit is great... this sort of thing fits their character superbly.

 

good luck!

Link to comment
Share on other sites

So you stole my idea? Kidding. I have a Tarot card reading in my mod.

https://onedrive.live.com/?cid=B60C11D037429D8E&id=B60C11D037429D8E%2153143&parId=B60C11D037429D8E%21191&o=OneUp

 

My tarot reading 'results' are based on what player has done or not done, who player has met or not, what perks and levels the player is at, factions joined and some random variables because that's how life is.

Link to comment
Share on other sites

Congrats!

 

Just checked out the page.

 

The only comment I'll make is that my eyesight isn't the best and the font size on the description was almost unreadable for me... I suppose I only whack those draugr, dragons etc because they're big enough for me to see!

 

Apart from that, rock on! You must be proud and deserve to be. Well done.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...