Engine Ideas/Suggestions

Report any bugs or ideas/suggestions that arise during testing of the Alpha Build Version 5

Re: Engine Ideas/Suggestions

Postby youngneil1 » Tue Jul 23, 2013 9:45 pm

Hehe, yes indeed, Grue, I played DSA (that's indeed the common acronym in Germany for "Das Schwarze Auge") quite a lot in my youth. Drakensang computer RPG was done with lots of love and is a great game - shame that this series is abandoned (I am very weary of the current HD remake of the older DSA CRPG, but we will see).. But truth be told, I played D&D / AD&D even more :D.

I think D&D (Pathfinder the latest, not fourth edition) is the system set with most influence on my RPG thinking/gut feeling. Of course it's intermixed with all the other stuff I played over this incredibly fast passing amount of time, dominantly Warhammer, Middle Earth Roleplaying System, Midgard (another German system), Ars Magica (very cool, you play a covenant of mages and their fellows, each player usually has multiple characters), glorious Cyberpunk (think Shadow Run but without fantasy creatures and without magic) and Legend of the Five Rings (Rokugan campaign, though I did more reading on that one than actual playing). Ah, good memories all along the way, also of a few house rules and even self-designed systems of friends or of mine... Agree with all the comments you made there, particularly that Off-Hand should only appear when relevant and that some space might be taken form description box and added to Misc.).
User avatar
youngneil1
Backer
Backer
 
Posts: 4698
Joined: Sat Dec 08, 2012 7:51 am

Re: Engine Ideas/Suggestions

Postby slowdive » Wed Jul 24, 2013 4:26 am

I made a significant change to the way the Character Sheet works. Now the text in the "Main" panel is from a script: "characterSheetMiscData.cs"
This script can be placed in your module's script folder and it will override the default one (the default will be in the data/scripts folder). Here is a screenshot and the script follows:

characterSheet2.jpg
characterSheet2.jpg (227.75 KiB) Viewed 1758 times


Code: Select all
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using IceBlinkCore;
using IceBlink;
using System.Drawing;

namespace IceBlink
{
    public class IceBlinkScript
    {
        public CharacterSheet PcSheet = new CharacterSheet();
        public RichTextBox rtxtMisc = new RichTextBox();

        public void Script(ScriptFunctions sf, string p1, string p2, string p3, string p4)
        {
            // C# code goes here
            PcSheet = sf.currentCharacterSheet;
            rtxtMisc = PcSheet.rtxtMisc;
            PC pc = PcSheet.pc_character;
            //MessageBox.Show("fill text box for " + pc.Name);
            rtxtMisc.Clear();
            AddText("NAME: " + pc.Name, Color.Black, true, sf.gm.module.ModuleTheme.ModuleFontName, 12.0f);
            AddText("RACE: " + pc.Race.ToString(), Color.Black);
            AddText("GENDER: " + pc.Gender.ToString(), Color.Blue);
            AddText("CLASS: " + pc.Class.ToString(), Color.Black, true, sf.gm.module.ModuleTheme.ModuleFontName, sf.gm.module.ModuleTheme.ModuleFontPointSize, FontStyle.Bold);
            AddText("LEVEL: " + pc.ClassLevel, Color.Green, true, sf.gm.module.ModuleTheme.ModuleFontName, sf.gm.module.ModuleTheme.ModuleFontPointSize, FontStyle.Underline);
            AddText("XP: " + pc.XP, Color.Red);
            AddText("NEXT LVL: " + pc.XPNeeded, Color.Black, true, sf.gm.module.ModuleTheme.ModuleFontName, sf.gm.module.ModuleTheme.ModuleFontPointSize, FontStyle.Strikeout | FontStyle.Italic | FontStyle.Bold);
            AddText("HP: " + pc.HP + " / " + pc.HPMax, Color.Black, true, sf.gm.module.ModuleTheme.ModuleFontName, sf.gm.module.ModuleTheme.ModuleFontPointSize, FontStyle.Italic);
            AddText("SP: ", Color.Black, false); //false means stay on the same line, no carriage return
            AddText(pc.SP.ToString(), Color.Yellow, false);
            AddText(" / ", Color.Black, false);
            AddText(pc.SPMax.ToString(), Color.Magenta);
            AddText("AC: " + pc.AC, Color.Black);
            AddText("BAB: " + pc.BaseAttBonus, Color.Black);
        }

        public void AddText(string text, Color color)
        {
            rtxtMisc.SelectionColor = color;
            rtxtMisc.AppendText(text);
            rtxtMisc.AppendText(Environment.NewLine);
        }
        public void AddText(string text, Color color, bool newLine)
        {
            rtxtMisc.SelectionColor = color;
            rtxtMisc.AppendText(text);
            if (newLine)
            {
                rtxtMisc.AppendText(Environment.NewLine);
            }
        }
        public void AddText(string text, Color color, bool newLine, string fontName, float fontSize)
        {
            rtxtMisc.SelectionColor = color;
            rtxtMisc.SelectionFont = new Font(fontName, fontSize);
            rtxtMisc.AppendText(text);
            if (newLine)
            {
                rtxtMisc.AppendText(Environment.NewLine);
            }
        }
        public void AddText(string text, Color color, bool newLine, string fontName, float fontSize, FontStyle fontStyle)
        {
            rtxtMisc.SelectionColor = color;
            rtxtMisc.SelectionFont = new Font(fontName, fontSize, fontStyle);
            rtxtMisc.AppendText(text);
            if (newLine)
            {
                rtxtMisc.AppendText(Environment.NewLine);
            }
        }
    }
}


I created an AddText() method with a number of overloads for different options. You can see in the above example that there is a lot of flexibility in how you show your information including: font, font size, font color, font style (regular, bold, italic, strikthrough, underline, combinations of each), multiple colors on same line, etc. You could do all kinds of checks (see if has off-hand weapon) and even loop through current effects and print them out using colors that go with the effect (poison-green, etc.). You could add LocalString or LocalInts to each PC that you can call here and add to the list of stats like some of the achievements or titles you have recieved. You can change the order of item in the list, of course, as well.

What do you think?
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3046
Joined: Wed Nov 21, 2012 11:58 pm

Re: Engine Ideas/Suggestions

Postby youngneil1 » Wed Jul 24, 2013 4:55 am

Glorious! That's really impressive, Jer. This way the character sheet is truely customizable and will allow authors 100 percent flexibility. Most welcome :) .

We could further develop this script over time with commented-out-lines for various possible statistical info, so even users that do no scripting at all would just have to comment in/out the information preferred.

Dynamic showing of info for e.g offhand is very powerful. And it's extremely helpful that this way the charsheet can react dynamically to the effects existing in this particular adventure setting (scifi, fantasy, steampunk,..) and affecting this particular character.

Hunger, Reknown, Name of the party's spacship... It's all doable now, cool 8-)

Would be great to do the same for the creature/enemy info in the combat screen :) . Module authors could then make the unveiling of more creature info easily depend on e.g. Skill rolls or a global variable counting how many creatures of this type the party has killed already. That's really a crazy amount of customizability, thumbs up.
User avatar
youngneil1
Backer
Backer
 
Posts: 4698
Joined: Sat Dec 08, 2012 7:51 am

Re: Engine Ideas/Suggestions

Postby slowdive » Wed Jul 24, 2013 5:23 am

youngneil1 wrote:Would be great to do the same for the creature/enemy info in the combat screen :) . Module authors could then make the unveiling of more creature info easily depend on e.g. Skill rolls or a global variable counting how many creatures of this type the party has killed already. That's really a crazy amount of customizability, thumbs up.


I'll add some of the same functionality to the combat log as well. Also, I think I should setup the "Attributes" panel to use a script as well for customizing it as well...maybe some builders might want Attributes, saves and maybe AC,HP, SP here...who knows :lol:

I like the idea of using presets that can be commented in or out for easy use with non-coder types.
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3046
Joined: Wed Nov 21, 2012 11:58 pm

Re: Engine Ideas/Suggestions

Postby Lurking Grue » Wed Jul 24, 2013 9:17 am

Great stuff! Fully customizable misc. attributes will really open up the possibilites for customization. There's a lot of things that can be done with it, like Karl already wrote above. Excellent, most excellent!

The new character record looks very good, not counting the (yes, I know it's only for example purposes) mishmash of color that almost makes my eyes bleed. ;) I'd still like to see ability modifiers after the attribute values, but if the attributes box will be open for customization too, then I can always squeeze them in myself (something like "STR: 12 (+1)" shouldn't be too difficult to pull off, even with my anemic coding skills).

I think a bit of "padding" (i.e. space) between the window border and the text ought to be put in the Description window. The text looks a bit cramped when it squeezes right up to the window borders, as it does now. At least IMHO.

Regarding the black no LOS squares and the softening to them (talked about above), the border could also be represented with semi-blocked squares of 50% visibilty with a black 50% raster/overlay, or something. This raster could also show poorly illuminated areas, having it go from 100% visible/lighted (0% raster), to 75% (25% raster), 50% (50% raster) and 25% visible/lighted (75% raster) would be cool. SOmething approximately like e.g. in Ultima 6. Here's an extreme example of it in action, the screenshots on that page show the effect (do note that it is very extreme in those screenies due to the player wandering inside LB's castle at night with no torch or other source of illumination - stumbling around in the dark, in effect). The linky: http://lparchive.org/Ultima-4-5-and-6/Update%2035/ .

youngneil1 wrote:all the other stuff I played over this incredibly fast passing amount of time, dominantly Warhammer, Middle Earth Roleplaying System, Midgard (another German system), Ars Magica (very cool, you play a covenant of mages and their fellows, each player usually has multiple characters), glorious Cyberpunk (think Shadow Run but without fantasy creatures and without magic) and Legend of the Five Rings (Rokugan campaign, though I did more reading on that one than actual playing).

I'm not familiar with Midgard, but all the other games mentioned above are excellent games. Very good list! Heh, good old Cyberpunk RPG, I remember it well. I was a GM, running a campaign with it back in the early 90's (when it was easy to get together with friends every week or every other week for a game session - nowdays would be lucky to do a session once a month). Good memories. I'm cautiously hopeful of the Cyberpunk CRPG now in development by CD Projekt Red (makers of the Witcher CRPGs) with the original author Mike Pondsmith.
"It is pitch black. You are likely to be eaten by a grue."
User avatar
Lurking Grue
Backer
Backer
 
Posts: 291
Joined: Sat Dec 08, 2012 12:26 pm

Re: Engine Ideas/Suggestions

Postby youngneil1 » Wed Jul 24, 2013 11:16 am

not counting the (yes, I know it's only for example purposes) mishmash of color that almost makes my eyes bleed.


Hehe, yes, thought so, too :mrgreen:

Yes to attribute modifiers and padding in the description window.

Such lighting model, with increasing darkness levels, would be a very atmospheric thing. Of course stuff behind/fully blocked by LoS tiles would go to 100% black instantly as it's simply not visible, while e.g. looking down a corridor would have squares gradually grow darker. Liked the look of it in the Ultima screens (btw. just noticed the sunrise indicator in top right corner of Ultima screen; nice atmospheric idea).
User avatar
youngneil1
Backer
Backer
 
Posts: 4698
Joined: Sat Dec 08, 2012 7:51 am

Re: Engine Ideas/Suggestions

Postby youngneil1 » Wed Jul 24, 2013 1:27 pm

Been thinking about the lighting idea a bit further - how about each area having a set of lighting properties like this:

NeverSeen (Dawn, Day, Dusk,Night), a value between 0% and 100% per each of the four listed times of day/night; 100% means totaly clear, 0% totally dark/black
FogOfWar (Dawn, Day, Dusk,Night), a value between 0% and 100% per each of the four listed times of day/night; 100% means totaly clear, 0% totally dark/black (Note: Fog of War is always of a higher/same value than NeverSeen, if lower by accident, use at least NeverSeen; FogOfWar is applied to fields that were once within InSightRadius, but are now out of it)
InSightRadius (Dawn, Day, Dusk,Night), a number measuring the radius of squares around the party with full 100% visibility for each of the four times of day/night listed; fields taht are LoS blcoked are always considered as out of InSightRadius
DropOffAmount (Dawn, Day, Dusk,Night), a number between 0 and -100 for each of the four times of day/night listed; this indicates the amount to be subtracted from 100% visibilty for squares outside inSightRadius; this is applied cumulatively for each further square of distance beyond InSightRadius; Example: with DropOffAmount -25 and InSightRadius of 3, squares 4 steps away from the party would only have 75% visibilty, those away 5 steps only 50%, thsoe 6 steps away only 25% and those 7 or more steps zero. BUT: Visibilty is never reduced by DropOffAmount to a value below NeverSeen (for utterly undiscovered fields) or FogOfWar (for already discovered fields); Note: fields that are LoS blocked always use either NeverSeen or FogWar, i.e. they have DroppOffAmount of -100 in any case
PartyLightSourceEffect (Dawn, Day, Dusk,Night)): this will increase InSightRadius by the value listed for each time of day/night; simulates the party carrying a e.g. lantern or torch in some off-hand slot (or having other means of lighting/dark vision)

I hope a system as such would be able to simulate lighting on e.g. large scale outdoor maps that are supposedly representing miles of land on a single screen as well as indoor dungeon maps only a few dozend meters wide. It's quite input intensive (many parameters), but theoretically very powerful. Thoughts?
User avatar
youngneil1
Backer
Backer
 
Posts: 4698
Joined: Sat Dec 08, 2012 7:51 am

Re: Engine Ideas/Suggestions

Postby youngneil1 » Wed Jul 24, 2013 1:38 pm

I'm not familiar with Midgard, but all the other games mentioned above are excellent games. Very good list! Heh, good old Cyberpunk RPG, I remember it well. I was a GM, running a campaign with it back in the early 90's (when it was easy to get together with friends every week or every other week for a game session - nowdays would be lucky to do a session once a month). Good memories. I'm cautiously hopeful of the Cyberpunk CRPG now in development by CD Projekt Red (makers of the Witcher CRPGs) with the original author Mike Pondsmith.


Ah, a fellow Cyberpunk fan :D Given CD Projekt Red's game history and really good attitude (DRM policy, GOG, community communication, post relaese care for their games, modding support) I am hopeful for the Cyberpunk CRPG. To have the original author onboard should ensure a quite unique and true to the source material experience. Very much looking forward to that one (well, to the Witcher 3, too, of course :P ).
User avatar
youngneil1
Backer
Backer
 
Posts: 4698
Joined: Sat Dec 08, 2012 7:51 am

Re: Engine Ideas/Suggestions

Postby slowdive » Thu Jul 25, 2013 4:42 am

Made some more updates to the character sheet and debug console:
-now you can customize the "attributes" panel as well from the same "characterSheetData.cs" script
-changed padding and background color of some panels (use GroupBoxBackGroundColor instead of StandardBackColor)
-debug console now has a button that clears all the stored compiled scripts so that you can edit a script and the next time it is called, it will recompile from your recent edited version...this great speeds up the script testing process (no need to close and reload game as much to test script changes and/or fix errors. Helped a lot when working on character sheet script testing.

screenie:
characterSheet3.jpg
characterSheet3.jpg (236.93 KiB) Viewed 1731 times


and the code:
Code: Select all
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using IceBlinkCore;
using IceBlink;
using System.Drawing;

namespace IceBlink
{
    public class IceBlinkScript
    {
        public CharacterSheet PcSheet = new CharacterSheet();
        public RichTextBox rtxtMisc = new RichTextBox();
        public RichTextBox rtxtAtt = new RichTextBox();

        public void Script(ScriptFunctions sf, string p1, string p2, string p3, string p4)
        {
            // C# code goes here
            PcSheet = sf.currentCharacterSheet;
            rtxtMisc = PcSheet.rtxtMisc;
            rtxtAtt = PcSheet.rtxtAttributes;
            PC pc = PcSheet.pc_character;

            rtxtAtt.SelectionTabs = new int[] { 25, 50, 75, 100 }; //changes the default spacing between tabs (in pixels)
            int strRaceMod = pc.Race.StrMod;
            int dexRaceMod = pc.Race.DexMod;
            int intRaceMod = pc.Race.IntMod;
            int chaRaceMod = pc.Race.ChaMod;
            int conRaceMod = pc.Race.ConMod;
            int wisRaceMod = pc.Race.WisMod;
            int strE = (pc.BaseStr + strRaceMod - 10) / 2;
            string strMod = strE.ToString("+#;-#;0");
            int dexE = ((pc.BaseDex + dexRaceMod - 10) / 2);
            string dexMod = dexE.ToString("+#;-#;0");
            int intE = ((pc.BaseInt + intRaceMod - 10) / 2);
            string intMod = intE.ToString("+#;-#;0");
            int chaE = ((pc.BaseCha + chaRaceMod - 10) / 2);
            string chaMod = chaE.ToString("+#;-#;0");
            int conE = ((pc.BaseCon + conRaceMod - 10) / 2);
            string conMod = conE.ToString("+#;-#;0");
            int wisE = ((pc.BaseWis + wisRaceMod - 10) / 2);
            string wisMod = wisE.ToString("+#;-#;0");
            rtxtAtt.Clear();
            AddTextAtt("STR: \t" + pc.Strength + "\t(" + strMod + ")", Color.Black);
            AddTextAtt("DEX: \t" + pc.Dexterity + "\t(" + dexMod + ")", Color.Black);
            AddTextAtt("CON: \t" + pc.Constitution + "\t(" + conMod + ")", Color.Black);
            AddTextAtt("INT: \t" + pc.Intelligence + "\t(" + intMod + ")", Color.Black);
            AddTextAtt("WIS: \t" + pc.Wisdom + "\t(" + wisMod + ")", Color.Black);
            AddTextAtt("CHA: \t" + pc.Charisma + "\t(" + chaMod + ")", Color.Black);
            AddTextAtt("--------------------", Color.Black);
            AddTextAtt("HP: " + pc.HP + " / " + pc.HPMax, Color.Black);
            AddTextAtt("SP: " + pc.SP + " / " + pc.SPMax, Color.Black);
            AddTextAtt("AC: " + pc.AC, Color.Black);


            rtxtMisc.Clear();
            AddText("NAME: " + pc.Name, Color.Black, true, sf.gm.module.ModuleTheme.ModuleFontName, 12.0f);
            AddText("RACE: " + pc.Race.ToString(), Color.Black);
            AddText("GENDER: " + pc.Gender.ToString(), Color.Black);
            AddText("CLASS: " + pc.Class.ToString(), Color.Black);
            AddText("LEVEL: " + pc.ClassLevel, Color.Black);
            AddText("XP: " + pc.XP, Color.Black);
            //AddText("NEXT LVL: " + pc.XPNeeded, Color.Black, true, sf.gm.module.ModuleTheme.ModuleFontName, sf.gm.module.ModuleTheme.ModuleFontPointSize, FontStyle.Strikeout | FontStyle.Italic | FontStyle.Bold);
            AddText("NEXT LVL: " + pc.XPNeeded, Color.Black);
            AddText("-------------------------------", Color.Black);
            AddText("Fortitude: " + pc.Fortitude, Color.Black);
            AddText("Reflex: " + pc.Reflex, Color.Black);
            AddText("Will: " + pc.Will, Color.Black);
            AddText("-------------------------------", Color.Black);
            AddText("AC: " + pc.AC, Color.Black);
            AddText("DR: " + pc.TotalDamageReduction, Color.Black);
            AddText("Move: " + pc.MoveDistance, Color.Black);
            AddText("-------------------------------", Color.Black);
            AddText("BAB: +" + pc.BaseAttBonus, Color.Black);
            AddText("Main Hand: " + pc.MainHand.ItemName, Color.Black);
            AddText("Damage: " + pc.MainHand.ItemDamageNumberOfDice + "d" + pc.MainHand.ItemDamageDie, Color.Black);
            int modifier = 0;
            if ((pc.MainHand.ItemCategory == Item.category.Melee) || (pc.MainHand.ItemName == ""))
            {
                modifier = (pc.Strength - 10) / 2;
            }
            else //ranged weapon used
            {
                modifier = (pc.Dexterity - 10) / 2;
            }
            int attackMod = modifier + pc.BaseAttBonus + pc.MainHand.ItemAttackBonus;
            AddText("ToHit: +" + attackMod, Color.Black);
        }

        public void AddText(string text, Color color)
        {
            rtxtMisc.SelectionColor = color;
            rtxtMisc.AppendText(text);
            rtxtMisc.AppendText(Environment.NewLine);
        }
        public void AddText(string text, Color color, bool newLine)
        {
            rtxtMisc.SelectionColor = color;
            rtxtMisc.AppendText(text);
            if (newLine)
            {
                rtxtMisc.AppendText(Environment.NewLine);
            }
        }
        public void AddText(string text, Color color, bool newLine, string fontName, float fontSize)
        {
            rtxtMisc.SelectionColor = color;
            rtxtMisc.SelectionFont = new Font(fontName, fontSize);
            rtxtMisc.AppendText(text);
            if (newLine)
            {
                rtxtMisc.AppendText(Environment.NewLine);
            }
        }
        public void AddText(string text, Color color, bool newLine, string fontName, float fontSize, FontStyle fontStyle)
        {
            rtxtMisc.SelectionColor = color;
            rtxtMisc.SelectionFont = new Font(fontName, fontSize, fontStyle);
            rtxtMisc.AppendText(text);
            if (newLine)
            {
                rtxtMisc.AppendText(Environment.NewLine);
            }
        }

        public void AddTextAtt(string text, Color color)
        {
            rtxtAtt.SelectionColor = color;
            rtxtAtt.AppendText(text);
            rtxtAtt.AppendText(Environment.NewLine);
        }
        public void AddTextAtt(string text, Color color, bool newLine)
        {
            rtxtAtt.SelectionColor = color;
            rtxtAtt.AppendText(text);
            if (newLine)
            {
                rtxtAtt.AppendText(Environment.NewLine);
            }
        }
        public void AddTextAtt(string text, Color color, bool newLine, string fontName, float fontSize)
        {
            rtxtAtt.SelectionColor = color;
            rtxtAtt.SelectionFont = new Font(fontName, fontSize);
            rtxtAtt.AppendText(text);
            if (newLine)
            {
                rtxtAtt.AppendText(Environment.NewLine);
            }
        }
        public void AddTextAtt(string text, Color color, bool newLine, string fontName, float fontSize, FontStyle fontStyle)
        {
            rtxtAtt.SelectionColor = color;
            rtxtAtt.SelectionFont = new Font(fontName, fontSize, fontStyle);
            rtxtAtt.AppendText(text);
            if (newLine)
            {
                rtxtAtt.AppendText(Environment.NewLine);
            }
        }
    }
}


And from a Red Carnival look (of course the font is different so the number of "------" would need to be adjusted in the RC version of the "characterSheetData.cs" script:
characterSheet4.jpg
characterSheet4.jpg (243.19 KiB) Viewed 1728 times
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3046
Joined: Wed Nov 21, 2012 11:58 pm

Re: Engine Ideas/Suggestions

Postby youngneil1 » Thu Jul 25, 2013 7:25 am

Looking very good - I like the "------" separator (has a strong pen&paper / book author / type writer feeling to it). Layout of all windows (and their relative position to each other) makes a well thought and polished impression already. Nice to see attribute modifiers back in and also it's a good idea to place some very core information right under the attributes.
User avatar
youngneil1
Backer
Backer
 
Posts: 4698
Joined: Sat Dec 08, 2012 7:51 am

PreviousNext

Return to Alpha Build 5 Bugs and Ideas Reporting

Who is online

Users browsing this forum: No registered users and 1 guest