Aller au contenu

Photo

Can an Add-In check single player plot flags?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
AmstradHero

AmstradHero
  • Members
  • 1 239 messages
So I'm looking at creating a short Add-In module to the official single player campaign. However, I only want the area in which the Add-In occurs to be accessible during certain parts of the main quest. In order to do this, it seems that I would need to be able to check the status of certain plot flags.

However, having created an Add-In module to extend the Single Player campaign, I do not appear to have any visibility of the core plots of the single player campaign, hence cannot view their flags.  Hence using a #include on the relevant plot raises an error that it can't find the resource.

Is it possible to be able to view these plots and their flags?  If so, how would I go about doing this?

Modifié par AmstradHero, 14 décembre 2009 - 08:00 .


#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
You need to check the box next to Single Player under File/Module Properies/Hierarchy.

#3
ArathWoeeye

ArathWoeeye
  • Members
  • 205 messages
First, sorry for necromancy but since it's a short thread, I'll go on.



I was about to ask the same question and see it answered. I have a question related to that.

If I use this method to get some info from SP, like a plot flag, maybe a character name or something for my add-in...

1-) Do I have to keep the box checked?

2-) What exactly does checking the box do(prolly answers 1st question)?

3-) Will it require me to export any additional files or so?

4-) Will it require me to put any extra code in scripts?

#4
Lotion Soronarr

Lotion Soronarr
  • Members
  • 14 481 messages
The box means that your module inherits the singleplayer - meaning that it can use and access both it's own files and singleplayer files, with it's file taking precendence.



To use any plot flag in any of your scripts or conversations, just add #include "plt_nameofplotfilehere" to the script and you're golden. You don't even need to do that for conversations. But yes, keep the box checked, it's easier.



No, you don't really need to export any extra files. Sometimes the toolset will do it (it will re-compile and export all scripts that are set to be included), but keep in mind you only need the file that calls for hte others, not the others (unless others are custom or you edited them).

#5
ArathWoeeye

ArathWoeeye
  • Members
  • 205 messages
Thanks for the answer!