<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://www.simswiki.info/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://simswiki.info/index.php?action=history&amp;feed=atom&amp;title=LUATutorials</id>
		<title>LUATutorials - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://simswiki.info/index.php?action=history&amp;feed=atom&amp;title=LUATutorials"/>
		<link rel="alternate" type="text/html" href="http://simswiki.info/index.php?title=LUATutorials&amp;action=history"/>
		<updated>2026-12-04T10:50:35Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://simswiki.info/index.php?title=LUATutorials&amp;diff=59985&amp;oldid=prev</id>
		<title>Kiwi tea at 19:50, 17 September 2012</title>
		<link rel="alternate" type="text/html" href="http://simswiki.info/index.php?title=LUATutorials&amp;diff=59985&amp;oldid=prev"/>
				<updated>2012-09-17T19:50:27Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:50, 17 September 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 109:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 109:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;--print(tutorialtasks[4].task_action.target_guids)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;--print(tutorialtasks[4].task_action.target_guids)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;[[Category:Modding]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;SimCity 4 &lt;/ins&gt;Modding]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kiwi tea</name></author>	</entry>

	<entry>
		<id>http://simswiki.info/index.php?title=LUATutorials&amp;diff=4087&amp;oldid=prev</id>
		<title>Delphy: Auto-inserted from WakkaWikki</title>
		<link rel="alternate" type="text/html" href="http://simswiki.info/index.php?title=LUATutorials&amp;diff=4087&amp;oldid=prev"/>
				<updated>2005-12-29T20:46:13Z</updated>
		
		<summary type="html">&lt;p&gt;Auto-inserted from WakkaWikki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{OldWikiEntry}} The Last type of LUA files found in simcity other than Misc simple LUAs and System (or general programming) LUAs are Tutorial scripts. There are three of these in the game as far as I can tell. 17051, 8517 and 5407. Here's as much of a spec as I can make.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Tutorials must be registered in the tutorial registry. Instance ID ff7d91e7 at the bottom. Format is &amp;quot;tutorial_registry : add_tutorial(hex2dec('abfad020'), 0, 'timbuktu')&amp;quot; where the id is the tutorial guid, 0 is the order of tutorials, and timbuktu is the region directory it's in.&lt;br /&gt;
&lt;br /&gt;
The tutorial scripts actually begin with a series of definitions and functions in order to set the properties for how various things in the tutorials are determined. These only need to be defined once. The other two scripts simply call on these definitions in order to determine things&lt;br /&gt;
&lt;br /&gt;
All tutorials are made based on Steps. a step is an independant thing that you do inside a tutorial. when you complete what is requested you move onto the next step. Tutorials consist of lots of these steps followed by an ending block. Here's an example step and ending block with descriptions where possible&lt;br /&gt;
&lt;br /&gt;
---------------------------- Specification --------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----------------------- Start Block -- Primary Tutorial only&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tutorialtasks = { n = 0 } -- Primary Tutorial&lt;br /&gt;
&lt;br /&gt;
tutorial_number_index = { } -- Set Tutorial Index&lt;br /&gt;
&lt;br /&gt;
tutorial_decal_color_type = {} -- Decal table&lt;br /&gt;
   tutorial_decal_color_type.DECAL_YELLOW = &amp;quot;selection_yellow&amp;quot;&lt;br /&gt;
   tutorial_decal_color_type.DECAL_GREEN = &amp;quot;selection_green&amp;quot;&lt;br /&gt;
&lt;br /&gt;
tutorial_file_guids = {}&lt;br /&gt;
tutorial_file_guids[1] = &amp;quot;0x8a5b7a6c&amp;quot;&lt;br /&gt;
tutorial_file_guids[2] = &amp;quot;0xea5d6dc8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
tutorial_zone_type = { }&lt;br /&gt;
   tutorial_zone_type.kZoneTypeUndefined               =  0&lt;br /&gt;
   tutorial_zone_type.kZoneTypeLowDensityResidential   =  1&lt;br /&gt;
&lt;br /&gt;
tutorial_building_type = {}&lt;br /&gt;
   tutorial_building_type.kOilPowerPlant = &amp;quot;0x1f420000&amp;quot;&lt;br /&gt;
   tutorial_building_type.kCoalPowerPlant = &amp;quot;0x1f4d0000&amp;quot;&lt;br /&gt;
&lt;br /&gt;
tutorial_dispatch_type = {}&lt;br /&gt;
   tutorial_dispatch_type.kDispatchTypePolice = 0&lt;br /&gt;
   tutorial_dispatch_type.kDispatchTypeFire = 1&lt;br /&gt;
&lt;br /&gt;
tutorial_network_type = { }&lt;br /&gt;
	  tutorial_network_type.kRoad = 0&lt;br /&gt;
	  tutorial_network_type.kRail = 1&lt;br /&gt;
&lt;br /&gt;
tutorial_buttons = {}&lt;br /&gt;
   tutorial_buttons.kButtonDemolish                            = &amp;quot;0xe999c820&amp;quot;&lt;br /&gt;
   tutorial_buttons.kButtonDezone              =  0&lt;br /&gt;
   tutorial_buttons.kButtonLowDensityResidential   =  &amp;quot;0x01&amp;quot;&lt;br /&gt;
&lt;br /&gt;
tutorial_base_task_action = &lt;br /&gt;
{&lt;br /&gt;
   which_function = 0,&lt;br /&gt;
   startX = 0,&lt;br /&gt;
   startZ = 0,&lt;br /&gt;
   endX = 0,&lt;br /&gt;
   endZ = 0,&lt;br /&gt;
   guid = 0,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
tutorial_function_index = {}&lt;br /&gt;
   tutorial_function_index.UNDEFINED = 0&lt;br /&gt;
-- Functions that ask users to do some task&lt;br /&gt;
-- and check if users succeeds or not&lt;br /&gt;
--   ASK_TO_ZONE_AND_CHECK = 1,&lt;br /&gt;
   tutorial_function_index.ASK_TO_ZONE_AND_CHECK = 1&lt;br /&gt;
&lt;br /&gt;
(All functions designated in this block. Functions may be called from inside a command or may be inside any step independantly.)&lt;br /&gt;
EX.&lt;br /&gt;
&lt;br /&gt;
function set_camera(object, XCoord, ZCoord) &lt;br /&gt;
   object.cameraX = XCoord;&lt;br /&gt;
   object.cameraZ = ZCoord;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----------------------- Step Block&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- Step # ---&lt;br /&gt;
&lt;br /&gt;
a = tutorial_create_task(&amp;quot;0a39f624&amp;quot;) - Create step with this GUID&lt;br /&gt;
a.task_action = tutorial_check_button_clicked_no_arrow(tutorial_buttons.kButtonTerraform) -- Task which is based off a defined function from above&lt;br /&gt;
&lt;br /&gt;
tutorial_button_set(a, -- Set buttons based from the tutorial button function&lt;br /&gt;
tutorial_buttons.kButtonTerraform,&lt;br /&gt;
tutorial_buttons.kPuckButtonGod,&lt;br /&gt;
tutorial_buttons.kButtonZoomIn,&lt;br /&gt;
tutorial_buttons.kButtonZoomOut)&lt;br /&gt;
&lt;br /&gt;
a.zoomLevel = 0; -- Zoom level for step&lt;br /&gt;
set_camera(a,68,60) -- From defined function above&lt;br /&gt;
&lt;br /&gt;
a.instruction_msg = [[text@0x8a5ae472]] -- Locale IID for text. Define afterwards for lack of data possibilities if you want&lt;br /&gt;
a.try_again_msg = [[text@ea4ad695]] -- Locale IID for text. Define afterwards for lack of data possibilities if you want&lt;br /&gt;
a.congratulation_msg = [[text@8a5adc16]] -- Locale IID for text. Define afterwards for lack of data possibilities if you want&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
------------------- End Block&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tutorial_number_index[2] = tutorialtasks.n+1 -- Tutorials completed (now 2)&lt;br /&gt;
print (&amp;quot;second tutorial script&amp;quot;) -- Order of this script in the tutorial list&lt;br /&gt;
print (tutorial_number_index[2]) -- Location of this tutorial in index (second)&lt;br /&gt;
dofile(&amp;quot;tutorial_tasks3.lua&amp;quot;) -- Next tutorial call&lt;br /&gt;
--print(tutorialtasks[1].task_action) &lt;br /&gt;
print(tutorialtasks[1].target_buttons[1]) -- Print first target button&lt;br /&gt;
--print(tutorialtasks[3].target_buttons[1])&lt;br /&gt;
--print(tutorialtasks[5].target_buttons[1])&lt;br /&gt;
--print(tutorialtasks[4].task_action.target_guids)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 [[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>Delphy</name></author>	</entry>

	</feed>