-
Content Count
7 -
Joined
-
Last Visited
A long, long time ago...
Community Reputation
0 Clean SlateAbout Taaru
-
Rank
Freshman
-
How do I add conditions to a building?
Taaru replied to Taaru's topic in SC4 Modding - Open Discussion
Hey Daeley It turns out there were some funky unknown properties set in the exemplars for the Goober Hospital. in the SC4LOT there were entries in both "lot" and "main" exemplars: "Unknown - CBE243F7 - UInt32 - 0 - 0x00000001" and "Unknown - CA9B4CA8 - UInt32 - 0 - 0x00000001" Deleting these properties from the exemplars, combined with adding the package ID# as you suggested got the reward script working just fine. I have no idea what those unknown properties were doing, as the hospital functions just fine with them deleted. Just thought you might wanna know -
How do I add conditions to a building?
Taaru replied to Taaru's topic in SC4 Modding - Open Discussion
OK Thanks for your help! -
How do I add conditions to a building?
Taaru replied to Taaru's topic in SC4 Modding - Open Discussion
.... it's missing Do I add the IID of the LUA file into this line??? ex- --#-package:50A9690D# -- package signature -
How do I add conditions to a building?
Taaru replied to Taaru's topic in SC4 Modding - Open Discussion
Okay, here it is... -- This file defines advices for the the REWARDS dofile("adv_rewards.lua") building_tool_types.GOOBERHOSPITAL = hex2dec('50A96908') ------------ Reward record Goober Hospital ---- a = create_reward_cityplanning('50A96908') function a.condition() if (game.g_population > 30000) then return reward_state.AVAILABLE else return [[text@50A9690A]] end end --a.once = 1 a.timeout = tuning_constants.ADVICE_TIMEOUT_LONG a.title = [[text@50A9690B ]] a.message = [[text@50A9690C]] a.priority = tuning_constants.ADVICE_PRIORITY_URGENT a.mood = advice_moods.GREAT_JOB a.persist= 1 if (_sys.config_run == 0) then advices : run_triggers() end I don't know if this matters, but : LUA Script TGI = 0xCA63E2A3 0x4A5E8EF6 0x50A9690D LTEXT TGIs = 0x2026960B 0x6A386D26 0x50A9690 (A...B...C) ...Is that enough info? -
- 27 Comments
-
- terrain mod
- desrt
-
(and 1 more)
Tagged with:
-
How do I add conditions to a building?
Taaru replied to Taaru's topic in SC4 Modding - Open Discussion
I'm trying to add conditions to the SimGoober Hospital from the STEX (SG_6x4_GooberGenHospital_50a96908.SC4Lot). I looked at the LUA/LTEXT script from the Census Repository (CensusRepository_dd41d65.SC4lot) - and tried to set up a similar arrangement within the SG Hospital Lot file (with new IID's for newly created LUA and LTEXT files). For whatever reason, I can't get the conditions to show up when the mouse cursor is hovered over the SG Hospital greyed-out icon in the health menu - even though I am sure I have the LUA script pointers labelled correctly and aimed at the proper LTEXT files. I don't know if it matters, but I use DatGen to insert/export files and SC4Tool to edit properties and LTEXT. -
I have searched up and down the forum for a simple answer to this question and haven't found it, so could someone please help me out? All I really want to do is, for example, download a building and make reward conditions for it before it becomes available - like "game.g_population > 30000" I know I need to add 'Conditional Building = True' in the building exemplar, and that I need to set up a LUA reward script, with pointers to LTEXT files... I have copied the formats I've seen in other user-made LUA-LTEXT scripts (altered accordingly to fit my new building using Type/Group/Instance ID pointers, etc) - yet all I ever get is a greyed-out building in the menu.... AARRGGHH! Help!
