Aller au contenu

Photo

Universal Companions, a review


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

#1
kevL

kevL
  • Members
  • 4 061 messages
re. Universal Companions by AlanC9

playermenu_popup.xml - this file is the Gui used by many other add-ons and can be edited with any plain-text or programmer's editor. The original .Xml resides in \\Install->NwN2->UI->default\\ ( do not change this! )

Override versions can appear in \\MyDocs->NwN2->UI->custom (etc) or indeed anywhere in the \\MyDocs->NwN2->Override folders ( do a thorough search to make sure there's only one of them )

I_Raps wrote...

playermenu_popup.xml can also reside in the MyDocs->NwN2->Campaigns folder (in the subfolders for individual campaigns).

If you need to merge the Universal Companion .xml with a pre-existing playermenu_popup.xml in MyDocs, basically 3 elements need to be added to your already customized .Xml ; these are the headers AlanC9 gave them :

<!-- New -- Add PC to Database -->

<!-- New -- Remove PC from Database-->

<!-- New -- Add DB to Roster -->


Copy the extra text-code in, just under the hopefully already existing header & elements of

<!-- Party Roster -->

Now comes the tricky part. You have to vertically align everything. You need to recalculate the value for the total height of the Gui ( height="123" ) and enter that value up at the top in MENU_CONTAINER and PM_MENU_PANE. Since the default value for each new category is 24 + 2 pixels, and there are three of them : the new value will likely be +78

Now the trickier part: You have to go down through the long list of categories and adjust the y="123" values, making sure each category drops itself down by 24 + 2 pixels ( 26 pixels per ) ... the total value by the time you reach the bottom should be nearly the same as the height= parameters that you set up at the top.

nb. There is a way to do this while the game is running, using idleexpiretime="1.0", so you can quickly see any changes you've saved ... do Google ' nwn2 idleexpiretime '


The three new Menu buttons should appear as
1. Save character to DB
2. Remove char from DB
3. Add DB chars to Roster

Clicking any of those simply fires a corresponding gui_script, all of which implement NwN2's built-in DataBase feature. Some comments: if & when you're having troubles using Universal Companions, the first thing to do is delete the files it writes to \\MyDocs->NwN2->database. Those are

universalcompanions.cdx
universalcompanions.dbf
universalcompanions.fpt

( make backups, do what ya gotta do, I AM NOT RESPONSIBLE here <- ie, get a clue ;)

another Comment, is that I notice in the scripts, that when registering a companion only the first 17 characters of the companion's name are entered in the database, but when deleting a companion from the database, it searches said database for the full name ... that strikes me as Not Right (ie, when a companion has more than 17 characters in its name). The rest of the code, while eccentric, appears to run okay.


I could get it to crash to desktop only once, and although i don't recall the exact steps taken, it involved deleting my PC from the database; another bug-feature was that when deleting my companion from the database I could not longer control her 'toon although she remained listed as a member of the party & Roster. Note this did not happen consistently and may have been just me frigging around with the code .....

i Give the Universal Companions a 10 for ingenuity, but (as Alan himself makes clear in the description) only a 6 for beta implementation :|

Modifié par kevL, 06 janvier 2016 - 02:47 .


#2
Dorateen

Dorateen
  • Members
  • 477 messages
I used this mod to play through the OC and MotB, which was a few years ago. It did work as advertised, placing the required files into the Override folder. Although I didn't have any pre-existing .xml files, so this might have allowed for a clean installation.

Since SoZ and the introduction of the Party Editor menu, that kind of makes this a little less needed. However, the Party Editor is a campaign level function, so the Universal Companion database would still be good for stand alone modules. (Unless players want to go into the toolset and convert a module into a campaign, but that's a whole 'nother subject.)

The interesting thing is that AlanC9 is not even a fan of player-created companions, yet he still made this utility. That gets high marks from me.

Harumph!

#3
I_Raps

I_Raps
  • Members
  • 1 262 messages

kevL wrote...

re. Universal Companions by AlanC9

playermenu_popup.xml - this file is the Gui used by many other add-ons and can be edited with any plain-text or programmer's editor. The original .Xml resides in Install->NwN2->UI->default ( do not change this! )

Override versions can appear in MyDocs->NwN2->UI->custom (etc) or indeed anywhere in the MyDocs->NwN2->Override folders ( do a thorough search to make sure there's only one of them )


playermenu_popup.xml can also reside in the MyDocs->NwN2->Campaigns folder (in the subfolders for individual campaigns).  I have several there, most recently Path of Evil, and all have worked with UC.

#4
kevL

kevL
  • Members
  • 4 061 messages
^ added up to the OP

#5
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 592 messages
Universal Companions does not appear to be usable with the Mac App store version of NWN2. What is easily fixed is that the menu option to add DB chars to the roster does not appear properly, which is resolveable by changing the text in the xml to something shorter like "Add chars from DB". Unfortunately attempts to actually use the menu options generally just causes the game to crash. My advice is do not use it.

Regards

#6
Fnast

Fnast
  • Members
  • 24 messages
Thanks for this info, KevL and Kaldor. I did edit the .xml to display the 3rd button successfully, but the desired functionality is absent and it still crashes to the desktop when pressed. I cleared out the database folder first, and it appears pressing the first two buttons does create and write to the .dbf and .fpt files in that folder. However, I've never seen that a .cdx file gets created. Can you tell me more about how these files work and what I should be seeing in them?

Thanks,

Dan

#7
kevL

kevL
  • Members
  • 4 061 messages
no real clue, Fnast
all i can say, every rumor I've ever heard about nwn2's built-in DB is ... don't use it ;)

I mean, in winXP here, i get it to work but only trust it by keeping the steps very simple & 'positive'


hence, not surprised by the DB behavior that's been reported, although it's interesting to note the .Cdx file is missing .. but without the source (and more skillz than i have) methinks we're barking at phantom cats in illusory trees

#8
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 592 messages
I can play around with the scripts, but if the Mac version is failing on the DB functions used by the scripts rather than Alan's scripts themselves, which is what is likely, then the chances of having anything usable is slim. Fact is that games written for Windows work better in Windows. Fortunately Apple gives us BootCamp and Intel processors with our Macs.

Regards

#9
Fnast

Fnast
  • Members
  • 24 messages
Yep--I gave up on it and am scaling back some of my expectations for modding goodness;-(


Dan

#10
kevL

kevL
  • Members
  • 4 061 messages
yeh it's unfortunate

on the good side, I'm finding it a useful tool for testing, by using companions from old saveGames

#11
kevL

kevL
  • Members
  • 4 061 messages
addendum:
If you're getting "You cannot take control of this character at this time" message, I think i found a fix.

script: gui_ucregister.nss

insert
SetOwnersControlledCompanion(oCompanion);

before
bStored = StoreCampaignObject("UniversalCompanions",sCompanionName,oCompanion);

- haven't experienced the error since re-compiling that. ( I've rewritten the whole darn thing but am pretty sure that's the smoking gun. ) What it does is switch control off the character that's about to be added to the database, and onto the main PC -- note, when adding the mainPC to the database this error doesn't occur.



edit. If that doesn't quite work, wrap StoreCampaignObject() and put a 0.1f delay on it ....

Modifié par kevL, 06 mars 2013 - 07:56 .