Jump to content
IGNORED

Trouble with Dynamically Attaching Scripts to Objects.


Recommended Posts

24 minutes ago, 0lexan said:

Hi, I'd like any and all assistance: I am trying to follow the Creation Kit's guide on Dynamically Attaching Scripts (https://www.creation...taching_Scripts)

I followed the instructions to the letter, and I have no results to show for it. I appreciate all help.

I don't know what you expect people to "help" with.

 

You haven't provided anything.  All you say is that you followed a five page set of directions and "it didn't work".

 

At what stage did it go wrong?  Which steps have you verified as working?  What tools are you using?  What mod manager?  How much scripting experience do you have?  Are you trying to copy this exact thing, or adapt it to do something else?

Link to comment
59 minutes ago, Seijin8 said:

I don't know what you expect people to "help" with.

 

You haven't provided anything.  All you say is that you followed a five page set of directions and "it didn't work".

 

At what stage did it go wrong?  Which steps have you verified as working?  What tools are you using?  What mod manager?  How much scripting experience do you have?  Are you trying to copy this exact thing, or adapt it to do something else?

I appreciate your response, I was using the built in SSE mod manager, no external program, the latest CK64, I ran a debug.trace on initialization on both, which both returned correctly, I have scripted a decent bit, and I copy and pasted the code with it compiling correctly. According to the page, I should be able to hit a tree and have it additem to my character but it doesn't seem to add the item. I will attempt to run debug.traces instead of the additem function to see if it is at fault, though I believe that the issue may be a lack of hit detection at all.

Link to comment
6 minutes ago, 0lexan said:

I will attempt to run debug.traces instead of the additem function

Or do both, doesn't have to be either/or.  I prefer " MiscUtil.PrintConsole" for debugging, but I'm not sure if that is available on SSE.

 

Honestly that tutorial seems like a very complex way of doing something fairly simple, but having not tried it, maybe that is a decent way, dunno.  Mainly I would be wondering if the alias were filling correctly, and if the effect was actually being applied to the target (which should be visible in console).

Link to comment
14 minutes ago, Seijin8 said:

Or do both, doesn't have to be either/or.  I prefer " MiscUtil.PrintConsole" for debugging, but I'm not sure if that is available on SSE.

 

Honestly that tutorial seems like a very complex way of doing something fairly simple, but having not tried it, maybe that is a decent way, dunno.  Mainly I would be wondering if the alias were filling correctly, and if the effect was actually being applied to the target (which should be visible in console).

How would I check if it's being "filled" properly?

Link to comment
24 minutes ago, Seijin8 said:

Or do both, doesn't have to be either/or.  I prefer " MiscUtil.PrintConsole" for debugging, but I'm not sure if that is available on SSE.

 

Honestly that tutorial seems like a very complex way of doing something fairly simple, but having not tried it, maybe that is a decent way, dunno.  Mainly I would be wondering if the alias were filling correctly, and if the effect was actually being applied to the target (which should be visible in console).

All right, after doing a fresh new game, intro included, I still had no progress. The log shows that both quests initialize correctly, and that the update function is removing/adding the quest. I also put a trace alongside the additem, and I didn't get any output in the log. Any ideas?

Link to comment
19 minutes ago, 0lexan said:

How would I check if it's being "filled" properly?

Use console commands like "sqv" to see what is being used in the quest at that moment

16 minutes ago, 0lexan said:

All right, after doing a fresh new game, intro included, I still had no progress. The log shows that both quests initialize correctly, and that the update function is removing/adding the quest. I also put a trace alongside the additem, and I didn't get any output in the log. Any ideas?

The quests starting/updating is unlikely to be the problem.  The issue is whether the alias is filled, and if so, is the spell being used right?

 

All that can be discovered with the console.

Link to comment
13 minutes ago, Seijin8 said:

Use console commands like "sqv" to see what is being used in the quest at that moment

The quests starting/updating is unlikely to be the problem.  The issue is whether the alias is filled, and if so, is the spell being used right?

 

All that can be discovered with the console.

Yeah, while checking I found you were right, the aliases aren't being filled. So how would you recommend fixing this?

Link to comment
1 hour ago, 0lexan said:

Yeah, while checking I found you were right, the aliases aren't being filled. So how would you recommend fixing this?

If the aliases are empty, then change/lessen the conditions for filling them.  Usually you will do this and go too far (Ulfric and a Rabbit are filling aliases meant for trees, for instance), then reel it in from there.

 

If these are being generated from a cloak, make sure the cloak's distance is enough to catch it.

 

And btw, most modders have moved well away from using cloak effects whenever another alternative is available.  There are way too many problems associated with them.

Link to comment
5 hours ago, 0lexan said:

. According to the page, I should be able to hit a tree and have it additem to my character but it doesn't seem to add the item.

Hmm, I don't thing "tree" is an Actor. Actor is Nord or Argonian or Wolf or Troll. Tree is just tree.

 

As far as I know its to attach scripts to Actor. And "tree" is not Actor.

Link to comment
9 hours ago, Seijin8 said:

If the aliases are empty, then change/lessen the conditions for filling them.  Usually you will do this and go too far (Ulfric and a Rabbit are filling aliases meant for trees, for instance), then reel it in from there.

 

If these are being generated from a cloak, make sure the cloak's distance is enough to catch it.

 

And btw, most modders have moved well away from using cloak effects whenever another alternative is available.  There are way too many problems associated with them.

 

6 hours ago, Fotogen said:

Hmm, I don't thing "tree" is an Actor. Actor is Nord or Argonian or Wolf or Troll. Tree is just tree.

 

As far as I know its to attach scripts to Actor. And "tree" is not Actor.

As far as aliases being filled, they are done through a single if statement of the quest, which is if the item (tree) is in the created FormsList "TreesList", add as an alias. Fotogen is correct though, spells can only apply to Actors, but you mentioned there is a newer way to dynamically attach scripts to actors?

 

Also, the formslist includes every item under "Landscape" in "Trees", which even includes moss and other surface items for the trees, but since I filled out about 20 of the aliases, it shouldn't be a problem.

 

I'll try to see if removing the condition fills any aliases.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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