The following warnings occurred:
Warning [2] Undefined variable $awaitingusers - Line: 33 - File: global.php(779) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(779) : eval()'d code 33 errorHandler->error
/global.php 779 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 837 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 837 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 4950 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 4950 errorHandler->error
/global.php 837 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 174 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 174 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 179 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 179 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 174 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 174 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 179 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 179 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 174 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 174 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 179 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 179 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 174 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 174 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 179 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 179 errorHandler->error



High Frontier Forums
Making Squawk Mods - Printable Version

+- High Frontier Forums (http://highfrontier.com/forum)
+-- Forum: Mods (http://highfrontier.com/forum/forumdisplay.php?fid=12)
+--- Forum: Mod Development (http://highfrontier.com/forum/forumdisplay.php?fid=14)
+--- Thread: Making Squawk Mods (/showthread.php?tid=226)



Making Squawk Mods - AthenaRoberts - 12-23-2017

I'd like to make some mods. I'm mainly interested in Building mods, but Squawk mods seem easier right now. I read the info on the forum saying that the only available variables are: gravity, random, and randomPercent. I'd like to know how to add others like WaterUsage.


RE: Making Squawk Mods - AthenaRoberts - 12-23-2017

Here is one I just wrote using Joe's as a template.

// Second test of a squawk mod
title: Squawk Test 2
type: squawk
author: {
name: Athena Roberts
email: athena.roberts1@yahoo.com
www: http://athenaroberts.pw
}
context: ManageMode
// Note that MainMenu squawk mods only need one batch of squawks,
// but it must still be formatted as an (unkeyed) collection.

// This batch is for people complaining about or liking the gravity being high compared to their homeworld
{
when: gravity > 0.9
squawks: {
{ text: [OMG!|Wow!] Gravity [here is much higher|is much greater here] than [Mars|Luna|Ceres] where I'm from!; icon: FaceWorried}
{ text: I can't stay here. I'm too adapted to Lunar gravity; icon: FaceSad}
Looks like I need to do some exercising to get used to Earth normal gravity!
{ text: Nice feeling [solidly|firmly] attached to the ground again; icon: FaceHappy }
My brains are being pulled down to my feet!
I've fallen and I can't get up!
Who glued my feet to the ground?!?!
}
}

One problem I've noticed is with lines like "{ text: Nice feeling [solidly|firmly] attached to the ground again; icon: FaceHappy }", the squawk will print "Nice feeling [solidly|firmly] attached to the ground again" rather than something like "Nice feeling firmly attached to the ground again." I'm not sure why that is. I don't notice any differences between my syntax and the template's.


RE: Making Squawk Mods - JoeStrout - 12-23-2017

Looks like a good start! I don't know why the options aren't working for you. They should work — I have a squawk mod here that's installed all the time; it uses this feature on pretty much every message, and it's working here.

Perhaps there is some subtle difference in which characters you're using, even though they look the same. Perhaps email me your mod file (at the support address), and I'll get to the bottom of it and report back here.

(Please be patient though, as we're celebrating Christmas one day early in our house due to travel... so it's effectively already Christmas Eve for us!)

Best,
- Joe


RE: Making Squawk Mods - AthenaRoberts - 12-24-2017

Merry Christmas!  Hope you all have a nice time.  Look forward to your feedback when things slow down for you. Smile

I'd wondered about the characters too.  I'm using Notepad and my first test was to simply copy & paste yours and try it out.  It worked fine.

I did some more research and discovered there are issues with Windows 7 specifically supporting UTF-8.  However, I tried using Notepad++, which one can specifically set to encode in UTF-8, and have the same problem.  I completely stopped and restarted the game each time I made a change.