Master Sword: Unreal

Phosphorcracker

New Adventurer
Joined
Nov 30, 2012
Messages
73
Reaction score
2
Location
Glorious Germany
nah just kidding, just messing around with UE4 testing what a scrub like me can do.

@Thothie or whoever knows shit about that. if you can spare 5min could you make me a basic flow chart on how the character developement got managed ? doesnt need the fancy maths. TBH id outright just steal that one from MS:C if i had the source code.

I actually have a fair idea on how to structurize my character class in C++ but some insight on a working system surely will help me improve.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Lost in shuffle here...

Not sure exactly what you want... The struct is horrifically complex, partly because of the character encryption system, but also because, well, the stat system itself is horrifically complex.

There's a partial code example yonder (slightly dated):
viewtopic.php?f=1&t=8791&start=5

I'd really recommend dropping the MSC stat system, as it makes it impossible to determine player power in any meaningful fashion, especially since so much of that is equipment dependant to boot.

There's a rather massive thread related to this, where people drift between talking about MS:Unreal and MS:Unity, interspersed with some MSS drama, yonder:
viewtopic.php?f=1&t=9734

If I were to have it to do all over again (which I don't think I have enough years left in me to do), I'd go for a more simplistic point-buy system, coupled with a base level increase, allowing fairly dynamic builds, without letting players screw themselves over too badly, and monster/item creation systems that worked in much the same way, so you could have meaningful dynamic scaling when you wanted it, and had better defined and more predictable power levels to work with.
 

Phosphorcracker

New Adventurer
Joined
Nov 30, 2012
Messages
73
Reaction score
2
Location
Glorious Germany
to be honest iam never gonna finish this game. its just a way to fight my upcoming depression of failing in life and killing some hours.

Ive set for a system with just 1 Value for the skill which is also one variable for my calculation for damage. i plan on having a max hit of 910 with skilllevel + weapon damage (45 max) * 2 charge * 2 buff * 2 mob weakness * 1.25 acid debuff
Its 910 because theres 1 point of base damage. the only other ways would have been to start every skill at level 1 or i could just add 1 at the end of the formulae but that would end at 901 and iam a friend of even numbers.

with this calculation of damage its possible to deal the exact* same dps with any type of combat with the use of appropiate weapons/gear which in my eyes is one right step into build diversity.

*ofcourse weapon speed needs to be a factor i havnt wrapped my head around yet. and i intend to tone down ranged damage quite alot to accomodate to the fact of kiting tactics and the aimbot simple KI has.

Iam unsure if I want or am even able of coming around with a properly working dynamic system for character growth and strength.

As for HP and MP ive come to no other logical way to determine max values as to just add up all combat skilllevels times x for health and all magic skilllevels times x for mana. works fine, does the trick.

Reading the code sniplet ive settlet to get rid of all those values ( strenght fitness movementspeed) for now because iam a scrub. Base movement speed for everyone and the rest is kinda self explanatory why and where i got rid of it.

I have no clue on encrypting data and what woes networking will bring with it. In case I ever get to the point that i wanna start trying to get a working multiplayer I probably need to redo most of it anyway.

I am not a friend of point buy systems. I like when a character grows with what it does. I feel if you let ppl get stuff without ever having it done it breaks the game apart. like a magician being the overlord swords fighter just because he spend all his excess points there makes no sense to me and feels weird. you get the idea.

those advanced stats have a... how should i call it... handy utility about them. like a dynamically growing strength stat could be used for combat dmg, carrying weight, etc. what makes them attractive but to be honest if i really get a playable game together at some point i could still whenever rework damage calc and think of some way to implement it.

not too long, i did read: sorry for my thoughts being confusing and chaotic. thats how i work... sadly.

TL:DR; no need to throw too much attention here. its just me and my struggles.

btw thanks for your time

PS: the sniplet of determining stats made perfect sense to me. I can read and write C++, C#, Java, Assembler, a bit of LUA, and read about every scripting language unless it uses some needlessly made up or dumb specific syntax.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
You might try reading some table-top RPG documentation to get some ideas on what exactly you want to do. CRPG's let you get away with funky math, since the computer does it for ya, but table-top rules provide good macro images of how game combat balance and mechanics work, without hiding anything from you.

You can also hybridize your point-by and learn-by-doing systems. For instance, by causing repeated usage of a certain weapon/spell line to "unlock" levels, and having a point investment system to determine which skills you want to actually upgrade, possibly by perk investment.
 

Phosphorcracker

New Adventurer
Joined
Nov 30, 2012
Messages
73
Reaction score
2
Location
Glorious Germany
a perk buy system for skills prolly is a fun idea but on the other hand requires alot of thought. If you for isntance go with this system you need fancy skill names and cool or wantsome perks for every skill there is. So thats 12 different perk trees that need to be balanced and somewhat unique to each skill or else it feels like copy pasta the same shit in every skill which kinda defeats the purpose.

It is true that tabletop rpgs have a easy to understand stats system in most cases but i want to avoid pointless stat management. I want the player to play and explore and when they find a fancy new weapon or fancy new spell that this is immediately useable without consulting a guide on what stats do you need/want for what. Hence the relative simple math behind the damage.

While I as a Monster Hunter player understand that numbers and stats are a fascinating world to minmax I just wanna keep it simple for now as I dont know if I have the skills or the overmind to generate a system with sufficient depth to be fun to tinker with.
 

Jelly

Adventurer
MSC Developer
RiP
Joined
Nov 25, 2005
Messages
1,909
Reaction score
15
Age
31
Location
You are here --> X
Thothie said:
You might try reading some table-top RPG documentation to get some ideas on what exactly you want to do. CRPG's let you get away with funky math, since the computer does it for ya, but table-top rules provide good macro images of how game combat balance and mechanics work, without hiding anything from you.

This is both a great strength and a great weakness of TT-RPG's.
Most TT-RPG's have low complexity in their stat system, which is great.
But often they also tend to have a low depth as a side effect.
CRPG's often have too much complexity (because computers keep track of numbers) which is horrible, but allows for a lot of depth.
Ideally, one would try to find a system where there is very little complexity, while still allowing for great depth.

Extra Credits on depth vs complexity
 

Phosphorcracker

New Adventurer
Joined
Nov 30, 2012
Messages
73
Reaction score
2
Location
Glorious Germany
Jelly said:
Ideally, one would try to find a system where there is very little complexity, while still allowing for great depth.

Extra Credits on depth vs complexity

Yes, yes indeed. BUT: even if you try to generate the simplest (fuck english its too damn late) game generating depth with minimum complexity is a tough nut.

For example Story driven RPGs: when you want the players choice to create an individual path and have meaningfull impact you are creating depth with a load of complexity since even if you hold a simple good/evil/neutral line every decision forks into 3 storythreads that you have to comprehend as a player and have to logically build and design as the game creator. in step 2 you are creating possibly 9 (7) story threads and so on.

kinda moot point let me try again.

complexity or complex rules at hand are the birthpoint of depth. If you have 3 damage sources and every damage source behaves strictly the same you have meaningless diversion that brings minimum of depth. if you create rules like weaknesses to a certain source of dmg thats getting complex but also creates more depth as the player has now a meaningfull adjustment in their approach of a problem at hand in the game.

Another point: Immersion. I personally think that its important that the game feels alive. But to make the world come to life you have to set rules wich allow the player to interact with the world and the world to interact with the player what has to end in a somewhat complex ruleset. for example see pen n paper rpgs.

long story short: in my opinion its just impossible to create depth without complexity as they depend on each other. I anyhow agree that the complexity should be reasonable and manageable at all times to create a fun game.

I want to create a game that isnt done with just one playthrough, i want to create a world that has playable content for thousands of hours and this drives me to more complexity in the end. I know however that if you just send someone into a sandbox, here are your tools, this are the possibilities that its getting overwhelming. I know that there has to be a tutorial for every feature and i think in the end i will have a nice deep game that explained itself properly so i can get away with complexity.
 

Jelly

Adventurer
MSC Developer
RiP
Joined
Nov 25, 2005
Messages
1,909
Reaction score
15
Age
31
Location
You are here --> X
I agree with you completely. The way I see it, complexity is your currency, and you want to buy as much depth for your game as you can, for as little complexity as you can. But you can't have depth without complexity, it's just that some mechanics are cheaper in complexity than others. :p
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
I'd suggest sticking to KISS, for your first project.

Keep anything you might change later to mstring arrays so you can just add or change easily and make things more complicated later as needed. Character data, item data, and damage codes, especially, keep to a series of strings that can expand indefinitely, and just tag each so you can search and pull dynamically. This isn't efficient, but it keeps things simple and lets you adapt. The only place where this is going to be a performance problem is when transferring data between server and clients - for those instances, it's simple enough to reduce the data to indexes.

Immersion is going to be mostly a factor of maps and models, since you're working with Unreal. On the code end, you'll just have to be careful that all the physics, shaders, and material options are plugged in proper.
 

Phosphorcracker

New Adventurer
Joined
Nov 30, 2012
Messages
73
Reaction score
2
Location
Glorious Germany
I know that arrays are going to be my best friend during that project. What i dont get is your hint to keep damage codes to a string ? My first intention was to make a function for damage calculation, kinda hard to put into words.

getcharacterresist
getcharacterdamage

//here I create 17 variables for the 8 resist types and 8 damage types. Its probably easier to add charged, buffed, //acid to the character resist/damage so it would be 20variables.

boolean is charged
characterdamage = characterdamage * 2
boolean is buffed
characterdamage = characterdamage * 2

totaldamagedealt = characterresist * characterdamage //this here would be a big if else statement to find a //fitting combination of weapon damage type and character resist (yes i know this would be 15 else statements)

boolean is acid
totaldamagedealt = totaldamagedealt * 1,25 //java would turn my int into a double right here, does C# do the same //or wont it compile if totaldamagedealt is an int ?

return totaldamagedealt

NOTE: this is pseudocode that sure as hell wont compile anywhere.

Yes I know that when I have a mixed damage source that this will crumble to pieces. I plan on avoiding those. This is my rough idea on my damage calculation function. characters will have an array for resists and damage so this function should be useable on any combat, plaver vs player, player vs mob, mob vs mob you get my point.

Please go ahead and tell me why this is probably the worst approach xD.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Simpler to let an array handle your element types, so you don't have to type up a bunch of conditionals.

For instance, MSC handles elemental resistance script side:
Code:
takedmg cold 0.25
Which adds the string "cold" to the entity's resistance list, and gives it 75% resistance (ratios greater than one representing vulnerabilities).

Then, when a damage code with an element string defined hits the entity, the code runs through the entity's list of resistances, sees if it sees one starting with the same string, and multiplies the damage accordingly, if it's found.

MSC also allows defining an attack non-parryable by appending the element with "_effect", but that's a rather sloppy way to do such things. MSC damage codes are primitive, which has limited us in various things we'd like to do (such as combining elements in a single attack). A more dynamic string array would have allowed more.

Thus, I'd suggest making your damage code dynamic string sets that you can add to. If you want more efficiency you can, alternatively, use Enum arrays.

Say, if you wanted some sorta venomous lightning bolt striking everything in a line, a damage code might look like:
pseudodamage code said:
"source:<some_id>"
"element_poison:<amt>"
"element_lightning:<amt>"
"vector_start:<vec>"
"vector_end:<vec>"
"dot:poison:<amt>-<time>"
"xp_skill:<some_skill>"
"tag:armor_bypass"
"tag:parry_pypass"
"tag:all_in_line"
You can add various tags for various types of damage scans and effects (AOE, traceline, etc.), and easily add more for anything else you find you want down the road.

Not the most efficient (though it's not too bad if everything is resolved server side), but it keeps your system dynamic and lets you easily add features, as you find you need them.
 

Phosphorcracker

New Adventurer
Joined
Nov 30, 2012
Messages
73
Reaction score
2
Location
Glorious Germany
Thothie said:
Simpler to let an array handle your element types, so you don't have to cycle through a bunch of conditionals.

Then, when a damage code with an element string defined hits the entity, the code runs through the entity's list of resistances, sees if it sees one starting with the same string, and multiplies the damage accordingly, if it's found.

i must be retarded, that is some very comprehensive explanation right there. I actually know how to do that.

I was limiting my view to numbers and form everything in a mathematical manner. But words can form conditions just as well in the world of code. Thanks for opening my eyes again.
 

Jelly

Adventurer
MSC Developer
RiP
Joined
Nov 25, 2005
Messages
1,909
Reaction score
15
Age
31
Location
You are here --> X
I second the use of enums instead of strings, or at least indexes of strings instead of strings.
String comparison is rather expensive compared to integer comparison and could have an impact depending on the amount of checks per second (thinking DoT implementation).
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Yeah, stressing KISS over performance here - but Enum's are pretty simple easy to expand on. String comparison isn't *too* much of a problem for the modern processor beasts, but it does become a problem if you have to squeeze them up the pipeline to clients in multiplayer (in which case, just compile both sides with matching Enums).

As for DOT's - what I'd do (and have kinda done in MSC - though not for DOT's) is create an array stack of status flags with a few properties, such as ID, type, value, and expire time. Then check back once a second or so to apply their effects, or remove them when they expire (or have them generate callback delayed by their expire time). You can then create functions to sort this stack, remove all of X type of effect, add the values of all X type of effects, remove an effect by ID, etc. You could also use this effect stack to track your elemental resistances and vulnerabilities.

DOT's in MSC, currently, unfortunately, involve slapping on a temporary script that runs every second, which is a lotta overhead. I've yet to move them to this effect stack system, which I more recently implemented for other things, such as combat status and music flags, speed changes, and push resistances. (Think there's still some kinks to work out with my system though - seems nothing's reliable in this damned game - side effect of a dozen coders I suppose.)
 

Phosphorcracker

New Adventurer
Joined
Nov 30, 2012
Messages
73
Reaction score
2
Location
Glorious Germany
I can see how many coders and a lack of communitcation and or commenting can cause quite the chaos. but somedays I wish there would be someone who actually knows whats going on in my head and carries on for me for a while.

My latest problem that was also very retarded was my handling on how damage is "saved" during the fight. I had the return totaldamagedealt add on a int in the character itself wich gets compared with maxhealth till dead. what lead to the problem that the next mob with this character that spawned instantly died because the value didnt get reset because of an oversight on my end. also it didnt work for mobs at first sight because i used player stats and then decided it would be way smarter what i started at the damage code already to just merge the player character with all the other characters to get rid of some variables that are basically the same just other names.

That also lead to the problem that if I have the same character 3 times spawned. 1 dies all die. I have yet to come around with an optimal way to handle that.

That it was an int was also a dumb oversight on my end. Since it happens quite common that I hit fractions that got dropped. What brings me to my next point. In my Flowchart how I imagined the damage in my game i actually thought theres no way of hitting a fraction since i only use whole numbers. But at second sight I noticed i use alot of fractions as resistances and acid with 1.25 is also creating fractions like crazy. so much for only whole numbers. But since its the computer handling the math i guess thats not too big of a problem. Its just a matter of esthetics.

In the end it wouldnt be too bad to have some ppl to talk stuff over to get rid of alot of brainfarts before i write them down.
 
Top