Aller au contenu

Photo

SOLVED: Followers - questions about char_stage


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

#1
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
I'm setting up followers in my module, and following the Follower tutorial from the wiki. I want my module to work with the single player campaign. The tutorial recommends overriding char_stage.

Won't overriding char_stage make my module incompatible with any other module that adds followers?

Is there another way to add followers (I want to still use the party picker) without overriding char_stage?

Thanks!

Modifié par PavelNovotny, 03 mars 2010 - 05:33 .


#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
You shouldn't have to override char_stage directly, but you will need to use SetPartyPickerStage. Compatibility is still a potential issue, but a workable system should be possible to ensure compatibility. I'll try looking into it this weekend, possibly.

Modifié par Craig Graff, 26 février 2010 - 12:44 .


#3
Starlight

Starlight
  • Members
  • 407 messages
PavelNovotny,



I know there are at least one group which try to share the common resources to avoid overriding each other. You could have a look at this:



Companion Mod Authors - http://social.biowar...oup/1148/#group



Hope this can help.

#4
Proleric

Proleric
  • Members
  • 2 343 messages
I haven't been able to get SetPartyPickerStage working, but overriding char_stage works fine.

To avoid conflict, make a copy of char_stage in the toolset (e.g. coc_char_stage), ensuring that both the Module and the Owner Module properties are set to your module. Once exported, in the add-in's module\\override\\toolsetexport folder, rename both .are and .lst from coc_char_stage to char_stage.

When adding party members to the OC, you'd need to make new waypoints for them, of course.

However, the OP raises a more subtle question. What if two OC extensions both want to add party members? That's not so easy, because char_stage would need waypoints for both add-ins. IIRC, waypoints cannot be created dynamically.

I guess the Companion Mod Authors group could agree on a common char_stage, if they haven't already, but is there a better way?

Modifié par Proleric1, 26 février 2010 - 03:59 .


#5
Craig Graff

Craig Graff
  • Members
  • 608 messages
SetPartyPickerStage works fine, but only from the PARTY_PICKER_INIT event. It doesn't replace char_stage, it loads an overlaying area.

#6
Proleric

Proleric
  • Members
  • 2 343 messages
Is that a module event?

#7
Craig Graff

Craig Graff
  • Members
  • 608 messages
Yes.

#8
Qutayba

Qutayba
  • Members
  • 1 295 messages
I've made a working custom character stage for my module - new setting, lighting, etc. (as well as different followers). The .are and .lst have both been moved to the module's folder (the two files sometimes export to different folders by default, it seems),



I've noticed that if I open the main campaign after my custom module from the game's main menu without exiting the game first, the custom char_stage continues to override the official campaign's. This is fixed simply by exiting the game entirely and restarting. This suggests to me that the character stage is loaded differently and prior to other resources. I think conflicts between two modules that both alter the character stage will be likely.



How, for example, could you use two different mods that each add a companion to the main campaign if each of them overrides the character stage? Wouldn't you have the same problem if you set a different party picker stage? I know there's a way to allow areas to be altered by multiple mods through the use of scripting, so that the area itself does not need to be overridden. Could a similar process be used to add things to the character stage without overriding the stage itself? It seems conceivable, but would certainly be a scripting challenge, since the character stage has its own way of figuring out which objects will be present.

#9
Proleric

Proleric
  • Members
  • 2 343 messages

Qutayba wrote...

...the two files sometimes export to different folders by default, it seems...

That's why I suggested ensuring that both the Module and the Owner Module properties are set to your module. That way, the files export to the correct folder.

I've noticed that if I open the main campaign after my custom module from the game's main menu without exiting the game first, the custom char_stage continues to override the official campaign's.

Same issue, I suspect.
 

I know there's a way to allow areas to be altered by multiple mods through the use of scripting, so that the area itself does not need to be overridden. Could a similar process be used to add things to the character stage without overriding the stage itself?

I believe the answer is "no", because, as previously mentioned, you can't create waypoints in game, even using the PRCSCR approach. If I've understood Craig correctly, the SetPartyPickerStage approach is superior, because it overlays the stage areas, allowing several concurrent add-ins. Presumably, the combined stage might get a bit crowded, unless the authors mutually agree different positions for each of their new companions.

#10
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
So, what is the SetPartyPickerStage approach? I don't see it in the tutorial. :-)

#11
Proleric

Proleric
  • Members
  • 2 343 messages
Someone needs to try it out. Craig says "SetPartyPickerStage works fine, but only from the PARTY_PICKER_INIT" which is a module event, so maybe you could try writing a module event script.

#12
Hel

Hel
  • Members
  • 420 messages

Craig Graff wrote...

SetPartyPickerStage works fine, but only from the PARTY_PICKER_INIT event. It doesn't replace char_stage, it loads an overlaying area.


Thanks for the heads-up, Craig! I will add this snippet of information to the Wiki once I have tried it out for myself. Up until now I was under the impression that the function was broken - some of the functions really need an update to their descriptions to include this kind of information.

Proleric1 wrote...

Someone needs to try it out.


I will give it a try during my break in two and a half hours. If no one else does, I will post my feedback here. ;)


UPDATE

I gave it a try, but was not successful at getting the function to work, though, it is possible that I made a mistake in the code or that I simply misunderstood what this function is supposed to do. I added the following code to my module script's event catch code:

case EVENT_TYPE_PARTYPICKER_INIT:
{
   // Overlay the existing stage with my stage
   // Where "mystage" is the name and tag of my area
   // Where "partypicker" is the name of the default GDA

   SetPartyPickerStage("mystage", "partypicker");

   break;
}


I then exported the resources and started up the game and my add-in. The placeables that I added to my area were not showing up in both the character generation stage and the party picker stage. (Note: My area is, aside from extra placeables, an exact copy of the default char_stage area.)

Modifié par Helekanalaith, 02 mars 2010 - 01:02 .


#13
Craig Graff

Craig Graff
  • Members
  • 608 messages
Sorry, I gave the wrong event. It should be EVENT_TYPE_MODULE_GETCHARSTAGE (63).

#14
Hel

Hel
  • Members
  • 420 messages
Alright, that seems to fix it, thanks Craig.

case EVENT_TYPE_MODULE_GETCHARSTAGE:
{
   // Overlay the existing stage with my stage
   // Where "mystage" is the resource name of the overlay area
   // Where "partypicker" is the name of the default GDA

   SetPartyPickerStage("mystage", "partypicker");

   break;
}


My observations:
Your custom character picker stage area can have an area layout different from the default area, but placeables and other objects are not used, so do not bother with them. As for the new companions, they show up just perfectly.

The character generation camera centers around the char_chargen waypoint and the party picker camera uses the char_player waypoint. You can place the companions' waypoints wherever you want, but if they stray too far from the char_player waypoint the companions might not be visible on the screen. (The camera will be facing directly towards the tip of the waypoint's arrow.)

Modifié par Helekanalaith, 02 mars 2010 - 07:33 .


#15
Proleric

Proleric
  • Members
  • 2 343 messages
That works for me too. I've amended the wiki.

#16
PavelNovotny

PavelNovotny
  • Members
  • 344 messages
Worked for me as well! Thanks for all the help and the great work on the wiki!

#17
Lord Thing

Lord Thing
  • Members
  • 257 messages
Awesome, I'd tried to do this a while back, but hadn't been able to get it working, like others I'd assumed SetPartyPickerStage was broken, glad to know it's not :)

#18
Qutayba

Qutayba
  • Members
  • 1 295 messages
I think this SetPartyPickerStage is a much more elegant solution than the override system I had been using. Now here's a problem. How do I clean up and restore the original party picker? I had exported my custom area as char_stage, so I thought I could just delete char_stage.are and char_stage.lst from my override folders and the default stage would re-emerge as char_stage. This has not happened! Where else ought I to look to reverse my override?

NOTE: In the main campaign, the proper party picker has been appearing, UNLESS I went to the main campaign after playing in my custom module without quitting and restarting the game, in which case my custom party picker appeared in the main campaign. I've cleared char_stage files from my packages, single player, and custom module override folders. Is there some place I've missed?

#19
Proleric

Proleric
  • Members
  • 2 343 messages
Did you look at your override>toolsetexport folders in both AddIns>[module]>core and AddIns>[module]>module?

#20
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
Here's another endorsement for this thread and the wiki article - the other night I blew away my db (inadvertantly) and have been rebuilding - i had some serious hacks regarding char_stage/partypicker (affecting core) and I knew it - this time i decided to do it right and I followed you all --- what a pleasing result --- no interference with core and exactly the result I was looking for ...now back to solving the world map problem....dang lil grey box...

ps - that lil packages.xls fix for the dog...very diligent...nice...

props to you all.

Modifié par RecklezzRogue, 12 mars 2010 - 07:01 .