PDA

View Full Version : HoloGnome's MoodLighting Extension for CoreRPG



HoloGnome
May 31st, 2014, 23:07
Hi,

Attached is a fun extension for controlling the mood lighting of FG2 CoreRPG. It's still in progress with a lot more to do, but I'm at an interim point, would be very interested in your feedback and am happy to consider any requested features, etc. Download the file below.

Name: MoodLighting.ext
Current Version: 0.9.6
Updated: 01/17/2016
Slash Command: /ml

Supports up to FG3.1.5 - seems to work fine.

----------------------------------------------------------
1/17/2016 - v0.9.6 - LATEST
- updated version numbers and dates
- removed "-Test" designation
- now supports random color portals (/ml portal random), but not other randomization
- added HarvestMoon alias
----------------------------------------------------------
7/5/2015 - v0.9.5
- added additional moon modes (quarter, crescent, gibbous, full, blood, yellow, blue), sandstorm, various synonyms, and new images
- initial lighting reset (not currently handled by FG)
- miscellaneous some cleanup
----------------------------------------------------------
6/2/2014 - v0.9.4
- added random generator and random color portal descriptions (other randomization coming)
- added random colors for prismatic portal (since we can't really animate)
- added cyan & magenta for CMYK process color adventurers ^_^
- added special portals and also a portal off mode that will restore previous lighting
following a portal command (eventually)
- re-added client lock-out (got lost on interim rewrite)
- reorganized all the tables and added image sub-directories to support randomization
- beefed up time, water, weather, and adventure categories to cover more bases
and support future randomization
----------------------------------------------------------
6/1/2014 - v0.9.3
- Removed xml <ruleset> tag so that the extension will be seen by all rulesets (feature request)
- Did some tweaking/editing for mood and portal phrases
- Added an "on" alias for the /ml msg command - will set basic phrase mode
----------------------------------------------------------
6/1/2014 - v0.9.2
- NOW WITH PORTALS! Added portal support command. /ml portal [color]
...supported colors are: red, orange, yellow, green, blue, indigo, violet, brown, black, white, and "prismatic" (although it's really more pinkish ;) but has a prismatic icon )
- Fixed Savannah icon
- Modified some of the funny text
----------------------------------------------------------
6/1/2014 - v0.9.1
- Added support for console output on errors/alerts and added the command /ml console on/off. (feature request)
- Added 4 new moods: TUNDRA, TAIGA, STEPPE, SAVANNAH - total is now 25 different mood settings
- Added images for magic portals (not implemented yet) - red, orange, yellow, green, blue, violet, black, brown, white.

Errata: This version displays the wrong image for savannah - fixed in next version.
----------------------------------------------------------
Initial release - v0.9.0
MoodLighting.ext offers the following features:
- Over 20 mood presets for different adventure scenarios, expanding the original 4 in the UI, including: campfire, cave, clouds, dawn, day, desert, dungeon, dusk, forest, jungle, lava, mountains, night, ocean, plains, river, snow, storm, sunrise, sunset, and swamp
- The mood lighting includes changes to the color, mini-icons for each scenario, and short or funny messages.
- The ability to independently set the window alpha transparency level (preserved across mood changes), something which is not currently possible with the chat window commands.
- Built-In help (of course) - /ml help or just /ml
----------------------------------------------------------


I have tested it and it all seems to work OK without any issues. I hope you have fun with it, and I look forward to your comments.

Thanks!

HoloGnome

ps. For those of you who are lua experts, please feel free to provide lua feedback. I have never done any lua scripting until now and there may be things I'm doing that are not optimal. I have to say that lua makes me want to shoot myself with a potato gun. I simultaneously admire and loathe it, with the latter mostly directed at the syntax and missing features vs. other languages with which I am more familiar. Be that as it may, I have picked up some lua tricks in the process and think there is a lot to like about table-centric perspective, as well as the relative speed of lua. The code should be easy to follow and even has a built-in multi-color mini-debugger! :D

NOTE: If you would like to enable the debugger, just do a global find/replace on "-- printDebug" -> replace with printDebug. It debugs to the chat window.

darrenan
May 31st, 2014, 23:17
I'm just curious, was it not possible to hook and extend the existing slash command?

HoloGnome
May 31st, 2014, 23:18
Which one are you talking about? /lighting? It doesn't work properly (re: transparency)...also it is RGB value based, and it's not practical for everyone to remember RGB values. ;)

Also, bear in mind that, for me, this is an FG2 experiment and learning experience. If I have missed something grossly obvious, please tell me. :D I won't mind. I have only scratched the surface of FG2, but wanted to understand extensions and the lua environment. So, I wrote an extension.

darrenan
June 1st, 2014, 00:23
I just meant for the presets, since you're creating a superset of what /lighting supports, can you modify /lighting to support the expanded list? I was mostly curious if there was a technical limitation, or if you didn't even look into that possiblity.

HoloGnome
June 1st, 2014, 01:06
Do you mean simply adding additional commands to /lighting instead of basing my extension off of /ml? I have not tried to replace any existing / commands yet, don't necessarily know if that works, and just assumed they would conflict. At the moment, /lighting doesn't work very well (not that it couldn't be fixed) - transparency is broken and the command does things it shouldn't, behaving in an uncontrolled manner.

That being said, if it is possible to extend or override/replace /lighting without conflicting, I would have no trouble adding direct rgb support, since that's all it really does, as you say...but I also wanted a shorter command - the quicker the better from my perspective. I will look at it and also implement direct rgb + argb support (currently, I support alpha on its own and named modes that respect the current alpha setting as long as MoodLighting is the one that changed it), but it's an easy change to add rgb.

Thanks for the suggestion!

Top level slash commands aside, have you tried it out yet? :D

damned
June 1st, 2014, 02:05
works very well.
my only comment is you need more *fun/funny* in the "funny" comments!

HoloGnome
June 1st, 2014, 03:43
What? You don't like my jokes? :D This is just an initial functional milestone - there is a lot more to do. At the moment, there is only 1 "funny" message per mood. Most of the effort went into writing the code, then rewriting it after I had added a bunch of stuff, gotten the hang of lua, and realized that I needed to clean it up. I also spent a little time on UI/content/debugging, etc.

Glad you like it and thanks for the feedback!

damned
June 1st, 2014, 03:50
I only found one or two that didnt say "It is now XYZ" :)
But the extension works just fine.

HoloGnome
June 1st, 2014, 04:48
Oh - you have to type /ml msg funny ;) --> default mode is BASIC, which is what you were seeing.

Check the help -> /ml help (or just /ml)

damned
June 1st, 2014, 05:21
oh hey!
much better :)
http://www.fg-con.com/wp-content/uploads/2014/06/moodlighting.jpg

damned
June 1st, 2014, 05:21
oh hey!
much better :)
http://www.fg-con.com/wp-content/uploads/2014/06/moodlighting.jpg

HoloGnome
June 1st, 2014, 05:33
There you go! :) By the way - if you loop back with a test client, you will see that the confirmations of changing the mood (green check marks), etc. are only on the GM screen. ;)

Moon Wizard
June 1st, 2014, 08:13
Well done, sir. Can't wait to see what you get yourself up to as you become more familiar.

Cheers,
JPG

HoloGnome
June 1st, 2014, 14:06
Thx, MW! Did you see my comments regarding 5 requests for changes to Interface.setLighting() (https://www.fantasygrounds.com/forums/showthread.php?21179-Comm-function-to-post-a-chat-command&p=176512&viewfull=1#post176512)?

Also, per earlier discussion in this thread, is there a way to supersede existing slash commands or will they just conflict? --- edit -- never mind - it looks like I can just replace it without any conflict.

HoloGnome
June 1st, 2014, 15:37
MoodLighting.ext updated to 0.9.1 - see initial post in this thread.

HoloGnome
June 1st, 2014, 22:28
MoodLighting.ext updated to 0.9.2 - see intial post in this thread. Major change is that it now supports PORTAL lighting with 11 modes.

Ikael
June 1st, 2014, 22:57
This is great extension! Definitely going to use this in my game. Btw is there reason this extension is dependent on specific rulesets such as 4E, PF etc? I think this can be more generic (ie no ruleset-tag in extension.xml) Also I would love to see possibility to select premade lightning moods in windowmode, maybe something similar to existing lightning mood selection, but containing all the additional ones :) ~ because I am not savvy using slashcommands, it's too nerdy for my taste, haha.

HoloGnome
June 1st, 2014, 23:37
re: rulest - no idea - just assumed I had to do that as part of the xml template. I will check further.
re: window - that's the plan, but just starting out (only a week old) - not quite there yet -- but the commands are easy - just /ml + either portal & color or the setting and the /ml help shows all the commands. ;)

Glad you like it! Thx for the feedback! :)

Does it work with Savage Worlds? Don't think I included that one.

damned
June 2nd, 2014, 01:46
it works fine for me in Castles&Crusades - I havent peeked under the hood so i just assumed it was either CoreRPG or Any in the Ruleset tag...

Moon Wizard
June 2nd, 2014, 01:47
If you leave off the "properties.ruleset" tags in the extension.xml file, it will show up for every ruleset.

Regards,
JPG

HoloGnome
June 2nd, 2014, 03:11
Hi MW - thanks - that's what I'll do then. That way, anyone can use it. Makes sense, since it's doing hopefully standard calls and using the chat window - nothing too specific there.

damned - thanks for checking C&C. Glad it works.

HoloGnome
June 2nd, 2014, 03:30
Updated to v0.9.3 - see the first post in this thread. Removes <ruleset> tag, so the extension will work with any ruleset - not just 3.5E, 4E, C&C, etc. Other minor changes.

ImaTarget
June 3rd, 2014, 09:52
Nice, thank you!

HoloGnome
June 3rd, 2014, 17:17
You're welcome! :) The next versoin (0.9.4) will have the support shown in the attached image. It should be sometime in the next couple of days, as time permits.

HoloGnome
June 4th, 2014, 04:34
Was just working and realized I introduced a bug in the last version because of a rewrite. The client isn't locked out for GM commands in 0.9.3, but will be fixed in next version. Sorry about that.

GMTroll
June 9th, 2014, 18:15
Great extension, super easy to use especially if you drag the commands to the hot-keys :)

HoloGnome
June 9th, 2014, 20:20
Glad you like it! There will be an update coming soon with more features and a fix for the client-side access. Been a little busy.

Bidmaron
June 12th, 2014, 03:18
Thanks for the extension, Gnome! You're a great addition to our community.

swest
March 4th, 2015, 20:29
I only just now discovered this extension. Very cool...

Two questions:


What is the meaning of 'portal'? i.e., /ml portal blue

and


Does '/ml portal prismatic' work correctly? Should it show a multicolored gradient?

Oh.. Oh! I though of another:


Are you (HoloGnome) still working on this?

Thanks, a lot.

- s.west

HoloGnome
March 23rd, 2015, 17:52
Hi - yeah - I intend to keep working on it...but have been kind of busy. I'll test it out on the newest build. I have some new things to add. Portal is just for an in-game portal. You would use /ml portal blue if the party encountered a blue portal. Prismatic will eventually work, too.

swest
March 23rd, 2015, 17:56
Thanks for the response.


...Portal is just for an in-game portal. You would use /ml portal blue if the party encountered a blue portal...

Could you explain this? I don't know what an 'in-game portal' is...

Thanks.

- s.west

HoloGnome
March 23rd, 2015, 17:59
:) Think TOTM (Theater of the Mind) - you are GMing and the party encounters a portal in their adventure - you can type /ml portal [color] to add some flavor to the event. It's just Mood Lighting, so to speak.

HoloGnome
July 9th, 2015, 04:26
I have been making some changes to this extension. Attached below is a test version. If anyone has any feedback, let me know. There are a number of new settings - just type /ml help to see the list of commands.

taoistpunk
July 14th, 2015, 01:10
I have been making some changes to this extension. Attached below is a test version. If anyone has any feedback, let me know. There are a number of new settings - just type /ml help to see the list of commands.

Seems to no longer function in test mode...Castles & Crusades...

not sure if anyone else is having this issue. It gives me the message ie. you are in a keep, but no change in mood lighting

HoloGnome
July 15th, 2015, 08:32
If you see the Keep icon, it is working as expected (and behavior unchanged from previous version). There is no specific lighting for being at a Keep. I guess I could make it slightly more dim.

bnickelsen
January 13th, 2016, 12:59
Any plans to add icons like the for that come with FG?

Zacchaeus
January 13th, 2016, 13:58
I have been making some changes to this extension. Attached below is a test version. If anyone has any feedback, let me know. There are a number of new settings - just type /ml help to see the list of commands.

I can't find any problems with this; can the link be transferred to post #1 now since folks will be missing out :)

HoloGnome
January 18th, 2016, 03:27
Yeah...I'll be making some more changes to it, including throwing in a window, etc. Z - I'll move it up as is, for now. :)

HoloGnome
January 18th, 2016, 03:48
After doing some more testing, I found a randomization bug - I'll fix it tonight and update the main post.

HoloGnome
January 18th, 2016, 06:59
Updated the main post with version 0.9.6. It should work OK.

Vishera
January 25th, 2016, 23:54
whats the command to set it back to normal?

HoloGnome
January 26th, 2016, 00:33
/ml day will do it. Type /ml help to see all the possible commands.

Zacchaeus
March 28th, 2016, 16:25
Is it my imagination or is the case that there isn't any difference between a lot of the different colours. Or has something gone wrong?

I'm not really seeing any difference between Castle, Ruins, Pyramid, Temple, Keep, Tower and Tornado

HoloGnome
March 28th, 2016, 18:47
See previous reply in this thread. Those are just flavor locations. Hope you like it!

Zacchaeus
March 28th, 2016, 21:39
See previous reply in this thread. Those are just flavor locations. Hope you like it!

Ah, jolly good. I clearly didn't read enough :)

jreddin1
May 2nd, 2016, 18:57
Hi,

Attached is a fun extension for controlling the mood lighting of FG2 CoreRPG. It's still in progress with a lot more to do, but I'm at an interim point, would be very interested in your feedback and am happy to consider any requested features, etc. Download the file below.

...


Hi HoloGnome!

I decided to extend the Mood Lighting extension, by adding a window with some tabs to make it so you don't have to go to a sidebar. I've got a little cleanup to do yet, but I thought I'd post a couple screenshots to see if you were interested in having it be part of the official extension. Let me know what you think.

13927 13926 13925

BTW: The windows scroll with the mouse wheel. I didn't add scrollbars, and I'm not even sure scrollbars work in FG...

HoloGnome
May 7th, 2016, 21:36
Thanks for your efforts, but I am not soliciting outside help at this time. I will maintain it and already have other changes in progress.

jreddin1
May 7th, 2016, 22:15
No problem. Thanks for taking a look, and I look forward to seeing your future releases!

Szabtom
November 5th, 2018, 10:33
Hi,
First of all, thank you for this extension, it is great and I am going to use it in my next campaign.
I have a question, though. The chat commands seem to work fine but I do not see any buttons or icons for this extension in the UI. I am using the latest FG app and a campaign with the CoreRPG ruleset. Is this a compatibility/FG version issue or did I misunderstand and there was never a UI element?

Trenloe
November 5th, 2018, 10:47
I have a question, though. The chat commands seem to work fine but I do not see any buttons or icons for this extension in the UI. I am using the latest FG app and a campaign with the CoreRPG ruleset. Is this a compatibility/FG version issue or did I misunderstand and there was never a UI element?
There isn't any UI - it's all handled through chat commands. If you want to have frequently used moods then you can drag the chat command text to a hotkey bar.

Szabtom
November 5th, 2018, 11:17
Thanks for the quick reply, and the tip about the hotkey!

nooksak
February 17th, 2019, 03:20
Will this work with 5E?

LordEntrails
February 17th, 2019, 05:04
Will this work with 5E?
Probably. Since 5E is a child of Core, most Core extensions work in 5E. Since this effects mood lighting which is a core feature and not something thatI think 5E alters, this should work fine. But try it an see. It either will or won't, but shouldn't break anything.

Zacchaeus
February 17th, 2019, 09:11
Will this work with 5E?

Yes, it does.