Forum Discussion
9 years ago
"Hadron1776;c-15805092" wrote:
The GFX language seems an awful lot like C++
I found this in trait.IsValidForDisplay:
protected function IsValidForDisplay(param1:SimTraitsInfo) : Boolean
{
switch(param1.TraitType)
{
case SimTraitsInfo.TRAIT_PERSONALITY:
case SimTraitsInfo.TRAIT_GAMEPLAY:
case SimTraitsInfo.TRAIT_GHOST:
case SimTraitsInfo.TRAIT_ASPIRATION:
case SimTraitsInfo.TRAIT_PHASE:
return true;
default:
return false;
}
}
I think this might be applicable:
http://en.cppreference.com/w/cpp/language/switch
...as for saving the file, I made that OCCULT_SORCERER addition and reloaded it several times. It seems to be holding.
One huge difference between the GFX files and the examples in the documentation is that I don't think TS4 gfx files use the std namespace. But the principle is the same.
I just noticed that the GFX says "edit actionscript" meaning that's the language. But the code above was not modified before it was pasted, which confirms that sort of thing does work.
"Hadron1776;c-15805122" wrote:
Just found something probably more proper:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/statements.html#switch
Interesting. Never knew that about switch statements. Good to know. Guessing it's minutely less performance-cost.
Oh, also, I don't know what we're doing differently. :/ I've tried saving the file multiple times in multiple ways. It always appears to save the changes fine and then when I reload it, that function is empty.
"Hadron1776;c-15805250" wrote:"Triplis;c-15781218" wrote:
Lol, so fun stuff. I got around to trying something I've been wanting to test for a while now. I wanted to see if the command SHOW_OCCULT_POWERS_PANEL in a notification will reliably bring up the Powers Panel. It worked more or less as I thought it would.
Brought up the Vampire UI. But, uh... it's empty... lol. And the purple bar on the side just continuously fills up to the top and then starts over.
http://i.imgur.com/FvvEQwq.jpg
This shows:
- Don't strictly speaking need access to the normal UI button to open the Powers Panel.
- Need just about everything else probably, so it's probably a crapshoot anyway to use the Vamp UI for anything.
I think I know what the problem with that bar is.
The bar is set to reference the value of a statistic (The vampire XP stat), but your Sorcerers do not have that stat IIRC. So it doesn't know what to set the bar to.
Also, to add your occult to sims.occult_tracker tuning, you'd need to add your occult here:
class OccultType(enum.IntFlags):
__qualname__ = 'OccultType'
HUMAN = 1
ALIEN = 2
VAMPIRE = 4
Interesting, good to know!
Right now, I've kind of set aside the attempts to add an "official" occult type while I focus on other things, but if I get back to it at some point, this should be valuable insight.
About The Sims 4 Mods & Custom Content
Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.15,624 PostsLatest Activity: 25 minutes ago
Community Highlights
Recent Discussions
- 7 hours ago
- 8 hours ago
- 8 hours ago
- 9 hours ago