Stephan Fuchs 1 ano atrás
pai
commit
36ba763444

+ 8 - 1
mods/mod.html

@@ -1 +1,8 @@
-<tw-passagedata pid="1680" name="Start_before" tags="mod" position="1225,20975" size="100,100">Modded with Example Mod</tw-passagedata>
+<tw-passagedata pid="1680" name="intro_sg_select_char_after" tags="mod modExample" position="1225,20975" size="100,100">&lt;&lt;act &#39;Godess&#39;&gt;&gt;
+    &lt;&lt;gt &#39;modExample_intr_sg_select_godess&#39;&gt;&gt;
+&lt;&lt;/act&gt;&gt;</tw-passagedata>
+<tw-passagedata pid="1681" name="modExample_intr_sg_select_godess" tags="mod modExample" position="100,21100" size="100,100">&lt;h2&gt;Godess&lt;/h2&gt;
+	&lt;&lt;image &quot;system/1_openings/2_sg/nerd_0.jpg&quot;&gt;&gt;
+	&lt;p&gt;
+		Modded start.
+	&lt;/p&gt;</tw-passagedata>

+ 1 - 1
mods/util/MakeModableHtml.py

@@ -12,7 +12,7 @@ with open(file_path_html, 'r') as file:
     data = file.read()
 
 
-data = re.sub(r"""(<script id="script-sugarcube" type="text/javascript">)(.*?)(</script>)""",r"""\1$.ajax({  url: "test.html",  cache: false})  .done(function( html ) {    $( "tw-storydata" ).append( html );\2});\3""",data,1, re.S)
+data = re.sub(r"""(<script id="script-sugarcube" type="text/javascript">)(.*?)(</script>)""",r"""\1$.ajax({  url: "mod.html",  cache: false})  .done(function( html ) {    $( "tw-storydata" ).append( html );\2});\3""",data,1, re.S)
 
 
 with open(file_path_out, 'w') as file:

+ 3 - 0
sugarcube/src/PassageFooter.tw

@@ -1,5 +1,8 @@
 :: PassageFooter
 
+<<if Story.has($here+'_after')>>
+    <<include `$here+'_after'`>>
+<</if>>
 
 <<if $pc and $pc.gameover>>
     <<done>>

+ 12 - 12
sugarcube/src/autogenerated/start/intro_sg_select.tw

@@ -75,27 +75,27 @@
 	<p>The popular, cool and beautiful - These students are typically socially-gifted and are often blessed with natural good looks. They are envied by many because of this, and most want to be their friends. More than any other clique, they have the ability to ruin someone's reputation and make them social outcasts, which earns them the fear of many students. Being cool and good looking is all they value, so they tend to be subpar both athletically and academically.</p>
 	<p>Gopniks, rebels, punks and troublemakers - These students don't play by the rules and, in fact, will often happily piss on them if given half a chance. They are in decent shape from all of their fighting and troublemaking, but their predilection for drinking, smoking and drugs often counteracts this to a point. They are not the most well-liked students; teachers and parents alike take a dim view of them, as do the local police. Most students fear them, either from the years of bullying or from the gopniks' willingness to fight. Some students secretly envy their carefree attitude and apparent ability to sneer and wave off many of the social pitfalls that other students face.</p>
 	<p>Losers, teachers' pets, sluts and the ugly - These students are the outcasts, the people no one likes to spend time with, other than to bully them. Perhaps they are just socially awkward and never made many friends, broke one of the unwritten social rules, are ugly, a snitch, a slut and/or an outed gay boy. Either way, they all have one thing in common: they are easy targets to bully and mock.</p>
-	<<actCLA 'Full custom setup'>>
+	<<act 'Full custom setup'>>
 		<<gt 'intro_customization' 'start'>>
-	<</actCLA>>
-	<<actCLA 'Nerd'>>
+	<</act>>
+	<<act 'Nerd'>>
 		<<gt 'intr_sg_select_nerd'>>
-	<</actCLA>>
-	<<actCLA 'Jock'>>
+	<</act>>
+	<<act 'Jock'>>
 		<<gt 'intr_sg_select_jock'>>
-	<</actCLA>>
-	<<actCLA 'Popular'>>
+	<</act>>
+	<<act 'Popular'>>
 		<!-- !!if we can do school uniforms gets an appropriate or borderline uniform.-->
 		<<gt 'intr_sg_select_popular'>>
-	<</actCLA>>
-	<<actCLA 'Gopnik'>>
+	<</act>>
+	<<act 'Gopnik'>>
 		<!-- !!If you can do uniforms then they can choose inappropriate or borderline-->
 		<!-- !!can pick 1-3 tattoos at start-->
 		<<gt 'intr_sg_select_gopnik'>>
-	<</actCLA>>
-	<<actCLA 'Outcast'>>
+	<</act>>
+	<<act 'Outcast'>>
 		<<gt 'intr_sg_select_outcast'>>
-	<</actCLA>>
+	<</act>>
 
 
 :: intro_sg_select_char_nerd

+ 8 - 4
sugarcube/src/macros/gs.tw

@@ -50,16 +50,20 @@
     <</if>>
     <<run $hereStack.push($here)>>
 
-
-
     <<run console.log("GS: "+_args[0],$location_var[_destintation],$gt_history)>>
 
     <<if $gt_history[_ts][_destintation] <= _recursion_limit>>
-
+		<!-- We need to use _args[0] here because we can't rely on _destination not being changed in subpassages -->
         <<set $here = _destintation>>
         <<set $ARGS = $location_var[$here]>>
+        <<if Story.has(_args[0]+'_before')>>
+            <<include `_args[0]+'_before'`>>
+        <</if>>
+        <<include _args[0]>>
 
-        <<include _destintation>>
+        <<if Story.has(_args[0]+'_after')>>
+            <<include `_args[0]+'_after'`>>
+        <</if>>
     <<else>>
         <<run console.error('RECURSION LIMIT REACHED',_destintation,$gt_history)>>
     <</if>>

+ 86 - 2
sugarcube/src/mods/example/exampleMod.tw

@@ -1,2 +1,86 @@
-:: Start_before[mod]
-Modded with Example Mod
+:: intro_sg_select_char_after[mod modExample]
+<<act 'Godess'>>
+    <<gt 'modExample_intr_sg_select_godess'>>
+<</act>>
+
+
+:: modExample_intr_sg_select_godess[mod modExample]
+    <h2>Godess</h2>
+	<<image "system/1_openings/2_sg/nerd_0.jpg">>
+	<p>
+		Modded start.
+	</p>
+	<<actCLA 'Select another option'>>
+		<<gt 'intro_sg_select_char'>>
+	<</actCLA>>
+	<<actCLA 'Confirm this option'>>
+		<<gs 'intro_sg_select_char_nerd'>>
+
+		<<set $pc.legHair = -1>>
+		<<set $pc.pcs_hairbsh = 1>>
+		<<set $finances.cash = 20000>>
+		<<set $alterstrtimg = 8>>
+		<<run $pc.skillSetLevel('charisma',100)>>
+		<<run $pc.skillSetLevel('spirit',100)>>
+		<<run $pc.skillSetLevel('iceskating',100)>>
+		<<run $pc.skillSetLevel('people',100)>>
+		<<run $pc.skillSetLevel('persuasion',100)>>
+		<<run $pc.skillSetLevel('makeup',100)>>
+		<<run $pc.skillSetLevel('agility',100)>>
+		<<run $pc.skillSetLevel('strength',100)>>
+		<<run $pc.skillSetLevel('reaction',100)>>
+		<<set $pc.pcs_inhib = 20>>
+		<<run $pc.skillSetLevel('highHeels',100)>>
+		<<set $pirsC = 2>>
+		<<set $PirsC2_owned = 1>>
+		<<set $currentpursetype = 'fashionista'>>
+		<<set $currentpursenumber = 13>>
+		<<setinit $fashionista_purses[13] = 1>>
+		<<set $bag = 1>>
+		<<gs 'npc_relationship' 'socialgroup_setting' 10 5 10 5 5 5>>
+		<<run $npcs.set('A18','rel',1)>>
+		<!-- !!make sure this coming after the gs code above will still set christina to a 1 relationship, if I did this code correctly, if not look for this code in other spots and fix it pls-->
+		<<run $q.school.func('groupRelSet','cool',300)>>
+		<<run $q.school.func('groupRelSet','nerds',900)>>
+		<<run $q.school.func('groupRelSet','teachers',700)>>
+		<<set $kosmetica = 10>>
+		<<set $stanok = 10>>
+		<<if getvar("$player_avatar") == 0>>
+			<<set $pc.pcs_hairlng = 300>>
+			<<set $pc.eyesize = 3>>
+			<<set $pc.lip_size = 2>>
+			<<set $pc.eyelashes = 1>>
+		<</if>>
+		<<set $pc.pcs_skin = 2000>>
+		<<set $pc.pcs_teeth = 0>>
+
+		<<set $pc.genbsize = 30>>
+		<!-- !!d cup for ideal bmi-->
+		<<set $pc.salo = 90>>
+		<<set $pc.willpowermax = 100>>
+		<<run $q.school.func('grade_award','math',85)>>
+		<<run $q.school.func('grade_award','rus',90)>>
+		<<run $q.school.func('grade_award','lit',80)>>
+		<<run $q.school.func('grade_award','art',75)>>
+		<<run $q.school.func('grade_award','bio',80)>>
+		<<run $q.school.func('grade_award','pe',60)>>
+		<<run $q.school.func('grade_award','eng',85)>>
+		<<run $q.school.func('grade_award','geo',80)>>
+		<<run $q.school.func('grade_award','sci',80)>>
+		<<run $q.school.func('grade_award','shop',55)>>
+		<<run $q.school.func('grade_award','comp',80)>>
+		<<run $q.school.func('grade_award','mus',75)>>
+		<<run $q.school.func('grade_award','his',80)>>
+		<<set $pc.glass = 0>>
+		<<set $pc.modExample_isGodessStart = true>>
+		<<gt 'intro_sg_finalize'>>
+	<</actCLA>>
+
+:: intro_initialization_after[mod modExample]
+<<if $pc.modExample_isGodessStart>>
+	<<run $wardrobe.wear(['clothes','moncheri',16,'gown'])>>
+	<<run $wardrobe.wear(['shoes','moncheri',59])>>
+	<<run $wardrobe.wear(['coat','moncheri',7])>>
+	<<run $wardrobe.wear(['bra','lusso',18])>>
+	<<run $wardrobe.wear(['panties','lusso',18])>>
+<</if>>