Architectural planning failure
Dear Readers!
This blog post made for modders and players who wish understood more what and why happening during Slavers Of Skyrim Devlopment. A littile story of why i need trash 200+ line of code and 4+ work hours in the drain.
I make this writing to help others avoid my mistakes, plus writing this down make me help remember what no to do!
The original concept:
I have lot of tasks, that may can use same dialogues when the slave player fail to complite the task, or complite it.
Why not use same dialoge and dialoge tree multiple times with same code? its save lot of time plus i can make a centralized dialogue system that can be used easy foward data toward other part of the mod plus more stream lined to make actors do the same action agin and again.
Points of failure:
First big problem come when i realize each task has own uniqe ways to fail plus uniqe dialogues need to atached each task. in case task failed.
Secund problem some cases the task may given to a special npc or a story quest that need use own uniqe dialoge in case the task fails.
Third problem making a central modul that control tasks, its not fitt the whole picture: this means each task fail condition need own identifire and each task need own dialogue that made the central quest that contain the slavery player framework scripts and most working data. plus each time a new task made a new dialogue tree and new variables need declared in this dialogue system.
Quickly become hard to maintain and owerly complex. Far mroe effective and simpler to add each task own failure and or complition dialoge that uniqe to that task.
then the dialogue result need signaled back to the task sender script as player reactions.based on this the script that ordered the task started can procced with the right reaction on player actions.
The lesson:
1-done make central things that control evrything only if absolutly unavoidible
2-actions, action reactions, action effect if all linked to one object or thing. Make them one and handle as one single thing keep the code compact and evrything packed together this way the system more mudlar and if soemthing effect any part of this object only going to effect this object.
3-before start making scripts make a very tini mini modell, that can be used to try out how the script going to work and what effects expected, then make the test proto type modell then if that works make the final version.( this case i advanced the prototype and realized this is a dead end )
P.s.:
Yes i still learning how to make a working dising of this scale of a system, and ( probably ) this is not the last time i hit a wall with my head first.
2 Comments
Recommended Comments