I make mods in the Skyrim engine because I like tinkering with game/level/quest design. If you want to know why Skyrim runs poorly, here's an example of how the engine works.

Let's say I want to run a script on "NPCs in the vicinity of the player". For instance, if I need to know whether the NPC can see the player via that NPC's OnGainLOS event.

1. Make a quest that points to the player. This is the only way to run a script on startup: making a quest.2. Create a cloak ability that the quest script adds to the player. 2.a. Create a magic effect on an area around the player. This is the easiest way to affect all NPCs within a certain area.2.b. Right now, this magic effect is going to be applied every game tick, which is going to use up a lot of computational power. Add a script that toggles it on for a second, then off for four seconds or so.2.c. Skyrim has 'brawls' where you're not allowed to use magic, but because this is technically magic, it'll break those brawls. Add conditions to the magic effect that make it stop working during brawls.3. Create a spell. This spell is what the cloak effect casts on any NPC that comes into contact with it. 3.a. Create a magic effect for the spell that contains a script that runs AddSpell on the targeted NPC.4. Create a spell of the 'Ability' type. This is what the AddSpell script adds to the NPCs. Normal spells expire, abilities do not.4.a. Create the magic effect for that ability.4.b. Put whatever script you want the NPC to run into that magic effect.4.c. Make sure to include a special conditional statement for OnDying so that when the NPC dies, it doesn't keep running the script and bloat the save game.

So essentially you make a quest that adds a spell to you that casts a spell on any NPCs in the area that adds an ability that runs the script.

This is the easiest way the modding community has found to attach scripts to nearby NPCs.

I'm working on a voxel game engine in Rust because I'm a huge fucking hipster and Rust seems like a pretty good language actually. Here's the Github repo if you care: https://github.com/NotGyro/GestaltThe latest thing I've been thinking about is whether to use Lua, Python, or C# as a scripting language for this project (in Python or C# the core engine bits would be embedded in the scripting language, rather than the other way around.) I'm leaning towards Lua, because my main problem with Lua was the "end" keyword you need to put everywhere and the global-by-default behavior, and both of those can be fixed with a little project called Moonscript, which is a transpiler and is basically CoffeeScript for Lua.

I make mods in the Skyrim engine because I like tinkering with game/level/quest design. If you want to know why Skyrim runs poorly, here's an example of how the engine works.EYE OF ZA, July 01, 2016, 05:26:27 pm

Wow, okay, that's a mess. Is it any easier with SKSE?

I considered developing Skyrim mods - but every time I think "I want X feature," I go looking on Nexus and somebody has already implemented X feature.

It's been a while, but I remember making something with SKSE that could run a script on all actors in a cell. It has the functions GetNumRefs/GetNthRef that let you iterate over all objects of a certain type (like NPCs) in a cell, so presumably you could set up a cycle like the above where every four seconds you AddSpell to all NPCs matching whatever conditions you specify. (You have to repeat it because given NPCs' schedules and the player's movements, the NPCs in a cell can change at any time. Four seconds is a good medium because at top sprinting speed a player will cross a cell in about eight seconds.) In this case, all you'd need to make is a quest, a script for that quest to run GetNumRefs/GetNthRef/AddSpell, and the ability that contains the actual script you want the NPCs to run.

It's entirely possible that this would break the engine or be more computationally expensive, though. Skyrim's engine is such a weird cobbled together wreck that the fact that it can run at all is a feat.

I haven't put my mods up anywhere because they're more personal experimentation about "what if I could do ___" than any kind of finished product. I like the problem-solving more than the polishing.

It's just replacing braces with indentation to make code blocks more obvious since not everyone has good highlighting in their editor.It's also a way to force proper indentation upon your coworkers instead of having to use a linter to auto reject their commits. Come on guys, it's part of the orientation I give you, try to keep up.

Edit: Like i said on tf2 tonight, I like helping juniors become useful programmers so feel free to pester me.

It's just replacing braces with indentation to make code blocks more obvious since not everyone has good highlighting in their editor.It's also a way to force proper indentation upon your coworkers instead of having to use a linter to auto reject their commits. Come on guys, it's part of the orientation I give you, try to keep up.duz, July 02, 2016, 07:48:03 pm

I've felt both of these ways. Python's syntax is pretty stylish! I like it as a way to unify indentation, especially since they specify it in their style guide (no holy wars here pls). I mostly do Java nowadays so maybe I miss such a nice, minimal syntax. But the more I think about it, the more I think Python's whitespace-delimited blocks are on par with curly braces.

C's notation actually falls into kind of a minority if you include non-imperative, non-OO languages (a lot of your imperative OO languages like Java, C++, and C#, are designedly in the lineage of C) -- but the only family I know of where indentation-sensitivity seems to be treated as a default is the ML family. C's relatives in ALGOL and BCPL did not use {} / ;.

The alternate design is usually to use keywords in place of {} / ;, or just to use a different delimiter/terminating punctuation (like Prolog's , / . )

There was a study done that found that keyword-based syntax and indentation-based syntax were easier for new programmers to learn: https://www.quorumlanguage.com/evidence/evidence.pdf. (the full paper is unfortunately hard to find online, but from what I remember from reading it their methodology was super fair)