The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.taleoftwowastelands.com

New Mod Development: McEnhancements

General help and technical troubleshooting. Ask for help here if you can't find an answer in the FAQ.
Mystical Panda
Posts: 750
Joined: Wed Mar 30, 2016 2:02 pm

The MCM is complete and

Post by Mystical Panda » Fri Jun 10, 2016 9:25 am

The MCM is complete and functioning; Pelinor has fantastic and very easy to follow documentation for getting it up and running. I'll set custom MCM options to test out different gameplay mechanics or other things I might want to play around with as I go. Right now there's just one, auto-pov adjustment under "Gameplay".


For some reason, I can't get the shader effect to apply smoke to the downed robot. Does this require a certain script type? Can it be called from ScriptType=Quest in the Gamemode section?



Anacostia Crossing
Posts: 60
Joined: Mon Mar 24, 2014 7:45 am

Mystical Panda wrote:

Post by Anacostia Crossing » Fri Jun 10, 2016 11:40 am

[quote=Mystical Panda]


Does this require a certain script type? Can it be called from ScriptType=Quest in the Gamemode section?


[/quote]


Shaders can be called by quest scripts, yes.


Regarding my suggestion to follow vanilla NV, it comes from the fact that there are slight differencies between FO3 and NV (to not underevaluate when you follow a tutorial) and not all the tutorials are correct.



Mystical Panda
Posts: 750
Joined: Wed Mar 30, 2016 2:02 pm

Thanks AC, I really do

Post by Mystical Panda » Fri Jun 10, 2016 5:50 pm

Thanks AC, I really do appreciate the suggestions. Your not kidding there, most videos I've watched leave a lot to be desired (not to be negative towards them). There just aren't that many to choose from, and don't really take the time to explain how the engine "sees" things data wise. Your right, most are just "bare" bones explanations. I'd venture a good guess that as more and more information became available, the videos weren't really updated.


I really did look through Boone, or parts of him, Brisa and a few others; brushed over them. Most of what I saw function wise is fairly self explanatory- at least Beth made some of the function names make sense. I didn't really get an understanding of breaking "things" across multiple quests until I did the MCM menu- there's a character limit on the source script. Then it clicked... there's no vanilla "function" call to another script, you break it down in quests (which hold the data, and either make a new script, or use quest stages and "begin/end" script sections.


I might as I get things done, make some videos to help explain how to set up certain things. But when this mod is done, others can use it to build their own similar mod. I've got some errands to run, then I'll be back at it later. I put the stealth field on the robot, and it appears to be working so far. So for today, I'll just be testing out everything I've coded so far. I probably should upload the mod as I go showing the various stages. That way, if anyone wants to look at it, they're welcome to.



Anacostia Crossing
Posts: 60
Joined: Mon Mar 24, 2014 7:45 am

There's a limit on scripts,

Post by Anacostia Crossing » Fri Jun 10, 2016 8:11 pm

There's a limit on scripts, but it's not very small.
However you should forget splitting in quest stages, and instead use NVSE user defined functions (UDFs): http://geck.bethsoft.com/index.php?title=User_Defined_Function
The Beth wiki is pretty much updated and correct, if you don't hate reading, I write there too when I have the occasion.

Mystical Panda
Posts: 750
Joined: Wed Mar 30, 2016 2:02 pm

I really that compared to the

Post by Mystical Panda » Fri Jun 10, 2016 10:17 pm

I really that compared to the "quest" method- Thanks so much for showing me that. It's more like a programming language now, and more easily maintained/updated work-flow wise.


One thing I did note when dropping in a dead npc that I need to revive... At first I made 2, one dead, one alive. Disabled the alive one, then "operated" on the dead one, disabled that, then re-enabled the live one. That worked, but I was hoping to do it with just one. I found out that spawning a npc dead, then resurrecting him, left his health at 0, even though he was walking around. Apparent OnDeath only gets executed if damage is taken and results in <0 health, which hasn't happened yet. Setting his health (modav) in the script before resurrecting him didnt work, since from what I could figure by observing the result was, resurrect grabs his base stats (set in the geck) which are still 0 (health), but setting modav or setav after resurrect works as expected. Which in a way, makes sense, just takes a few debug tries to figure out the game logic behind it.



Anacostia Crossing
Posts: 60
Joined: Mon Mar 24, 2014 7:45 am

I agree, NVSE 4+ introduced

Post by Anacostia Crossing » Sat Jun 11, 2016 5:05 am

I agree, NVSE 4+ introduced many wonderful things for scripting and I've read your comment "it's more like a programming language" more than once, from programmers.

Often you can make the same thing in many ways. The result could be more or less expected, and the "path" to reach that result too. And after evaluating pros and cons, some methods can be defined better than others - I think mainly your experience depends by this.

An alternative for example could have been not putting 0 on base health, then kill the actor with rMyRef.Kill (and resurrect with rMyRef.Resurrect), then not use an OnDeath but still stick on a GameMode.
Since you are killing via script, in the same moment you could set a variable, so...
rMyRef.Kill
Set bNPCisDead to 0

and then, in gamemode:

if bNPCisDead
; He is dead, execute the code
endif

These are just examples, you will find better what suits you evaluating pros and cons

Mystical Panda
Posts: 750
Joined: Wed Mar 30, 2016 2:02 pm

Your right, as I'm going

Post by Mystical Panda » Sat Jun 11, 2016 6:03 am

Your right, as I'm going along I'm seeing new functions across vanilla and plugin (nvse, etc.,.) and it's opening a myriad of new ideas. Speaking of scripts- my main goal when writing scripts is to use "event" driven sections whenever possible. That way, less "cycles" are spent checking things the engine could do more efficiently, helping the mod run better on lesser equipped systems. The robot companion can't really die, he'll just go offline (at least in the beginning). You'll need to repair him again to get him up and running. OnDeath, to me, would be better, since it's only called when he cashes in, though I could do it in gamemode, yes. I'd rather those "cycles" go to something I have no choice but to put in there. Hopefully I won't be bogging down the engine any more than I need to.


Even though it's out of context for a companion mod, I've added a working MCM menu that I add gameplay tweaks to as I'm going. I'm working on the armor section one atm adding user selectable features. On this particular one, I'll need to apply a custom spell with an effects shader. But the shader thing isn't quite working for me yet.  I'll definitely need help with that part.



Mystical Panda
Posts: 750
Joined: Wed Mar 30, 2016 2:02 pm

Is there a function that will

Post by Mystical Panda » Sat Jun 11, 2016 7:54 am

Is there a function that will return the distance between a references feet (like the player) and the ground? Or at least return 0/1 from ref.IsOnGround ... or something along those lines?



Mystical Panda
Posts: 750
Joined: Wed Mar 30, 2016 2:02 pm

Here's the MCM so far. All

Post by Mystical Panda » Sat Jun 11, 2016 7:26 pm

Here's the MCM so far. All the options test out in game, except the last one. If there was a way to test if "player.IsOnGround" or something to that effect, I could calculate Y axis difference/velocity during free fall and then determine how hard to "hit" the ground.



User avatar
pintocat
Posts: 576
Joined: Sun Apr 07, 2013 12:50 am

Closest I can think of is JIP

Post by pintocat » Sun Jun 12, 2016 2:33 am

Closest I can think of is JIP's functions


http://geck.bethsoft.com/index.php?title=GetFallTimeElapsed


http://geck.bethsoft.com/index.php?title=GetFallTimeRemaining


http://geck.bethsoft.com/index.php?title=ResetFallTime



Post Reply