Search found 54 matches

by DaggorathMaster
Sat Feb 01, 2025 7:37 am
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3993
Views: 3550433

Re: Ask a simple question, get a simple answer

When I set champion:setHealth(0) After resurrection champion does not require food. setHealth() isn't a good way to do damage - it doesn't do any of the same handling as damage() does. Not requiring food after resurrection is a weird side effect, though. At health 0 you stop using food, and it just...
by DaggorathMaster
Mon Nov 04, 2024 3:26 pm
Forum: Mod Creation
Topic: NPC (Custom Brain, or No Brain)
Replies: 9
Views: 5487

Re: NPC (Custom Brain, or No Brain)

self.performAction() needs to use a colon, not a dot self:performAction() That should fix up the "bad self" errors. (Although that is not the only reason that error can happen.) Generally, if there are more than one of something, like monsters, champions, items, they use a colon to call fu...
by DaggorathMaster
Fri Oct 11, 2024 6:25 pm
Forum: Mod Creation
Topic: NPC (Custom Brain, or No Brain)
Replies: 9
Views: 5487

Re: NPC (Custom Brain, or No Brain)

You need one more "end" (without a comma). The first "end" finishes your "if elseif" statement. The second one finishes the function. - The first one has no comma, the second one does. elseif PerformAct == theraA1F then self.performAction("theraA1F") end, }, S...
by DaggorathMaster
Wed Oct 09, 2024 3:49 am
Forum: Mod Creation
Topic: NPC (Custom Brain, or No Brain)
Replies: 9
Views: 5487

Re: NPC (Custom Brain, or No Brain)

Another possibility for forcing the monster to stay still, is in the monster's def file, add an action: { class = “MonsterAction”, name = “stayStill”, animation = “idle”, }, That uses the animation of "idle", but skips the hardcoded logic for brain:wait() and lets you return true to stop t...
by DaggorathMaster
Tue Oct 08, 2024 2:55 am
Forum: Mod Creation
Topic: Is addConnector() badly borked (a technical term)?
Replies: 2
Views: 3617

Re: Is addConnector() badly borked (a technical term)?

OK that explains the difference. Also, it looks like hooks (in the defs) trace the line properly when they call a script that crashes, unlike added connectors which just dump the function calls for event handling (almost useless). Very helpful for sorting out another issue I could not cobble togethe...
by DaggorathMaster
Tue Oct 08, 2024 2:39 am
Forum: Mod Creation
Topic: NPC (Custom Brain, or No Brain)
Replies: 9
Views: 5487

Re: NPC (Custom Brain, or No Brain)

You could disable turning, so it won't happen randomly - I believe brain:performAction() will still work if called from onThink(). Then the monster will walk and pause as usual, not so mechanically, and it will only turn when you tell it to. And also disable attacks for NPCs, so that no default beha...
by DaggorathMaster
Sun Sep 29, 2024 10:59 pm
Forum: Mod Creation
Topic: Ask a simple question, get a simple answer
Replies: 3993
Views: 3550433

Re: Ask a simple question, get a simple answer

For gfxIndex, in the definition files you can add: 'gfxAtlas = "mod_assets/textures/atlas/<user_atlas_1>.tga,"' 'gfxIndex = (#),' To individual game object definitions. (user_atlas_1, or whatever your own files are named). Then you can keep the default icons for most things, and add your o...
by DaggorathMaster
Sun Sep 29, 2024 10:04 pm
Forum: Mod Creation
Topic: LoG 2 Starting Attributes?
Replies: 1
Views: 3176

Re: LoG 2 Starting Attributes?

Yes that seems reasonable. When in doubt: Strength increases load. The whole party benefits, if you have a lot of items. - Being slow (or immobile) is worse than having any other low stat. Willpower should be maxed for wizards, but also other high-energy builds can benefit. - e.g., if you find that ...
by DaggorathMaster
Sun Sep 29, 2024 9:45 pm
Forum: Mod Creation
Topic: Is addConnector() badly borked (a technical term)?
Replies: 2
Views: 3617

Is addConnector() badly borked (a technical term)?

Is addConnector() badly borked? I tried to add connectors in a specific case, runtime rather than littering the def files with hook definitions. And I get an untraceable error (event-triggered, which dumps the event-handling stack and kindly omits anything I ever did). Saying that "map" is...
by DaggorathMaster
Sat Sep 28, 2024 11:53 am
Forum: Mod Creation
Topic: [UMod] Hi-Res UI Scaling
Replies: 6
Views: 17565

Re: [UMod] Hi-Res UI Scaling

Is the nutcracker beta, required for this, available without Steam?