Aller au contenu

Photo

XML Help [Resolved - Include Files can mess up your day]


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

#1
Darin

Darin
  • Members
  • 282 messages
 So, I'm trying to use Lute Hero as a mini-game in my Haunted Halls campaign (will eventually allow you to make money and influence townsfolk with it; basically whenever the original would cast a spell, this one will either have someone else show up, have you make a perform check to influence people, or have you make a perform check against each friendly person to see if they toss a gold in the hat).

Ported over a lot of scripts, and got to the point where the Lute Hero GUI comes up.  Clicking on it, however, does nothing.  The song button(s) are clicking, but notheing happens.  The Quality radial is non-responsive, and the X button just moves, but does not close the GUI.  I'm not sure where to look for the issue; will pprobably dig around the xml file for the GUI, but not suire what that will do.  Any advice would be a huge help.

UPDATE:
The XML files seem to be in order, making the issue likely lie with either (1) where the scripts or (2) xml files are stored.  At present, the scripts are module scripts, and the XML files are in the campaign folder.

UPDATE 2:
Dug through the archieves of this forum, and only relevent one was not my issue, as all scripts start with "gui_".

Modifié par EpicFetus, 28 décembre 2013 - 05:03 .


#2
Tchos

Tchos
  • Members
  • 5 054 messages
Forgive the stupid question, but are the scripts compiled?

#3
Darin

Darin
  • Members
  • 282 messages
They should be (all were imported in from an existing module), and one has been compiled since I imported (I have a text send message when you push the button, but that isn't happening.

Just in case, I compiled all scripts in the module...still nothing.

Modifié par EpicFetus, 27 décembre 2013 - 11:12 .


#4
kevL

kevL
  • Members
  • 4 061 messages
iirc, there should be a parameter

scriptloadable="true"

at the top of an .Xml, in <UIScene...> before scripts will run


- could check that,

#5
Darin

Darin
  • Members
  • 282 messages
scriptloadable="true", at least on the one I've been trying to test.

#6
kevL

kevL
  • Members
  • 4 061 messages
you say, the gui-window shows up okay, and it can drag around okay

and it gives a 'click' when a button is depressed, but nothing works not even the close [x] button?

#7
Darin

Darin
  • Members
  • 282 messages
Yes. It was taken out of Lute Hero; certain modifiers to the original scripts were needed, though I haven't touched the "gui_dwlh_*" scripts yet (accept to add a Send message and to remove SendDebugMesage() commands since those caused an UNDEFINED IDENTIFIER issue (and weren't in the gui_ ones, I think).

Do the gui scripts need to be a special location (i.e. campaign rather than module? which I doubt, since LH had them in module)? Do the xml files need to be in a certain place (at the moment, in a subfolder in my campaign folder called DWLH, which is same as was in Lute Hero)?

The issue seems to be that the UI won't launch it';s scripts... (tried moving one to campaign, didn't seem to help). It's all very strange, and frustrating.

#8
Darin

Darin
  • Members
  • 282 messages
well, when I remove the include file (and all the script except the SendMessageToPC part, it does run... weird. there is an issue in the include file, so it is a script problem. thank you for your time.

#9
kevL

kevL
  • Members
  • 4 061 messages
it might have been something to do with, gui-scripts need both the .Ncs & .Nss files (to prevent expoits on PWs, while regular scripts need only the .Ncs). perhaps they got out of sync...

#10
Darin

Darin
  • Members
  • 282 messages
The include file does NOT have the NCS version. How do I fix that?

#11
Darin

Darin
  • Members
  • 282 messages
so, copied all of the ones mentioned in includes to new scripts (to have both) and still nothing.

#12
kevL

kevL
  • Members
  • 4 061 messages
#includes don't compile by themselves to .Ncs files

What happens is that when compiling a script that references an #include, the compiler simply grabs the code it needs from the latter and stuffs it in

which is why i'm kinda wondering about gui-scripts with includes, too. Because, i've heard that gui-scripts need the raw code -- if so where exactly will the engine search for a required include? idk.

But the metaPrepa has gui's that work with includes, and those scripts + includes go in a directory in Override.

#13
kevL

kevL
  • Members
  • 4 061 messages
did you get a SendMessageToPC() to show up?

or the [x] button responding?

#14
Darin

Darin
  • Members
  • 282 messages
SendMessageToPC only shows up when the include (and most of the code for the button) is commented out. Haven't worked on the [x] yet, though all the "gui_" have the same include, so.

#15
Darin

Darin
  • Members
  • 282 messages
and the include script, gui, etc. work fine in Lute hero... so I had hope when the .nss vs .ncs idea was mentioned, but so far that seems to be a bust (though I could keep trying).

#16
kevL

kevL
  • Members
  • 4 061 messages
don't want to push it, there are happier things to do.

- just this: the [x] doesn't use a script at all. it's hardcoded, called via the .Xml 'close' element. That's why i was asking... it seems to be a clue ( like, if it's not working there seems to be a problem with the .Xml interacting with the engine, as you say could be directory structure, but i don't think that's it )


btw, i installed Lute Hero to have a look. porting it to another mod is nontrivial, to put it mildly

#17
Darin

Darin
  • Members
  • 282 messages
the x runs a "stopmusic" script, so it also closes a conversation and ends some variables, hence why it's not the hardcoded version (though I get why that would be important if it were)

Yeah, it's a real PITA.  but it is at this point just an issue with the main include(s), but I have no idea how to even begin to fix that.

<UIButton name="CloseButton" x=103 y=21 style="STYLE_CLOSE_BUTTON" OnLeftClick=UIObject_Misc_ExecuteServerScript("gui_dwlh_endsong") />

Modifié par EpicFetus, 29 décembre 2013 - 03:49 .


#18
Darin

Darin
  • Members
  • 282 messages
So, the include included another include that it used a single function from...removed that include, and now it sorta works (okay, scrolls but doesn't play the song, but at least the buttons DO something now). Haven't searched for that include elsewhere yet, but yeah

#19
Darin

Darin
  • Members
  • 282 messages
Wow, got everything to work except the actual song...as in, you can now play Guitar Hero without any of that pesky "music". Once I figure that out, I'm in business.

#20
kevL

kevL
  • Members
  • 4 061 messages
Lol,

(my computer's too slow to let me be a lute hero anyway )


'music' issue could well be directories..

#21
Darin

Darin
  • Members
  • 282 messages
Sound objects. Now it works. HOORAY! I wonder if I should, once I remove the 2da files I need from the hak, put something up on the vault?

#22
kevL

kevL
  • Members
  • 4 061 messages
... try your best to contact Adam first

Nexus doesn't want it unless you have permission. NwVault doesn't seem to care, and not sure about Vault2.


that's basically the 33/34/33 rule ;)_~

#23
Tchos

Tchos
  • Members
  • 5 054 messages
If your pack would make it easier for others to incorporate it into their mods, then I'd say yes.

When I wrote to Adam to thank him for the permission he gave for PJ to extract his custom placeables and make them more easily accessible for others to use, Adam told me: 

Adam Miller wrote...
"Feel free to use anything you'd like.  I went a little overboard on the little touches, especially the mini-games.  They were too much fun to make."


I believe when he said "feel free to use anything you'd like," this is not permission specifically given only to me and PJ, but for anyone who would like to use his resources in their modules.

Modifié par Tchos, 29 décembre 2013 - 05:49 .


#24
Darin

Darin
  • Members
  • 282 messages
cool cool, once I trim down the hak pack (to only the 2da that holds music) I may just do that, though I'll likely remove a bunch of stuff from it first.