Try opening the download Unity project separately first, see if there are any errors in that, there shouldn’t be.
You have a nullreferenceexption at the bottom of that screenshot.
Also, there are no bonuses being displayed between your stats/modifiers, I’m guessing the tiny 0 is where they should be? Have you dragged those UI Text GameObjects to the CharacterCreator fields in the Inspector?
The error is pointing to the Class dropdown, have you dragged that across to the Inspector also?
that was it i forgot to add it to the race
There is a Start
method which calls two populate methods, one for Class and one for Race, thus it needs references to both of the dropdown menus.
aww
how would i call the modifiers from one script to another eg i want to call on the intelligence modifier
At the moment, you can’t, as the access modifiers in the Character class (C#) are set to private.
ok, i have been looking on how to make a info text pop up when you scroll over something. eg the race and class you said that it would be best to do it as a resource. what would be the proper was of saying to because nothing is coming up the way i have looked up
i have been reading the link you sent. so i need to make another script called editor c# and make a resource folder and the text blocks to store the info in. is that right?
Hi Michael,
You could. Not sure of the necessity to call the script Editor though?
You could store the blocks of text yes, but what I was trying to point you in the direction of is having the required content read from something which you could change effectively outside of the game without ever having to rebuild it.
Perhaps start in the direction you are thinking at the moment and then go from there.
as in using switch and case and have the text displayed that way
Ok, I don’t think I’m explaining what I mean too well.
Consider a scenario where you release your game and then shortly afterwards, after lots of other people have played it, you get feedback about how a character it getting too big a bonus upon creation, and that there are typos in the barbarian description.
If this information is all hard-coded within the game then the only way to change it is to make changes within Unity, rebuild and re-release.
What I am suggesting as an end-goal, e.g. a place to be at the end, is one where-by you can make tweaks and changes outside of the game, outside of Unity but update that bonus and typos for the barbarian description within every installation of the game.
At the moment, if you were to create the blocks of text and have them under resources, then load them in when needed, all that would be required later on is a process to create those resources by reading in content from an external source, a webservice perhaps.
In some cases, if the data is static and will never change, then this would be unnecessary. For example, if the text just said what a barbarian was, what they were generally better/worse at, but without stating any numbers or stats, then that could be considered static content. But if it says “Human barbarians get to choose a +2 on one specific ability during character creation” I would argue that that isn’t static content, because you may at some point in the future want to change that +2 to a +1 or a +3. I would not want to search through a project to find every instance where we mention “+2” both in descriptions but also in code for specific situations. I would much rather that was a variable which was read in from config, I change that setting remotely, the config is read into the game during load, and boom, “+3”.
That’s what I’m suggesting as a end goal it should perhaps aim towards. The very nature of this game is a complex set of numbers that all interact with each other and thus untangling them in the future could be quite troublesome.
This is, again, something which should be a feature, I am not suggesting right now that a webservice is written, or a system that enables the configuration of races, classes, stats etc, but that we are aware that it could be necessary and as such work in a way that that would allow for its implementation in the future without having to rewrite the whole game.
Does that make sense?
yeah it dose.
i got the modifiers to be added in to the health and i added the skill points with the intelligence modifiers done
I’m currently outputting the level, experience and health to the UI.
When you mentioned about adding the modifiers to the health, is that what you mentioned before, where for example if you were a barbarian you got +2 hit points if you strength ability was above a certain value etc.
Is there a list of these?