<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://zeldamods.org/wiki/Translations:Difficulty_scaling/376/en/history?feed=atom</id>
	<title>Translations:Difficulty scaling/376/en - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://zeldamods.org/wiki/Translations:Difficulty_scaling/376/en/history?feed=atom"/>
	<link rel="alternate" type="text/html" href="https://zeldamods.org/wiki/Translations:Difficulty_scaling/376/en/history"/>
	<updated>2026-05-12T08:51:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://zeldamods.org/w_botw/index.php?title=Translations:Difficulty_scaling/376/en&amp;diff=9731&amp;oldid=prev</id>
		<title>FuzzyBot: Importing a new version from external source</title>
		<link rel="alternate" type="text/html" href="https://zeldamods.org/w_botw/index.php?title=Translations:Difficulty_scaling/376/en&amp;diff=9731&amp;oldid=prev"/>
		<updated>2020-05-11T12:27:03Z</updated>

		<summary type="html">&lt;p&gt;Importing a new version from external source&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;c++&amp;quot;&amp;gt;&lt;br /&gt;
bool Ecosystem::LevelSensor::scaleWeapon(const sead::SafeString&amp;amp; weapon_to_look_up,&lt;br /&gt;
                                         WeaponModifier required_modifier,&lt;br /&gt;
                                         const char** weapon_to_use_name,&lt;br /&gt;
                                         WeaponModifier* modifier_to_use,&lt;br /&gt;
                                         void* unknown)&lt;br /&gt;
{&lt;br /&gt;
  // some checks using &amp;#039;unknown&amp;#039; here which seems to be a pointer to the actor&lt;br /&gt;
  //&lt;br /&gt;
  for (weapon_table : this-&amp;gt;byml[&amp;quot;weapon&amp;quot;]) {&lt;br /&gt;
    // find the first weapon entry for which the player has enough points&lt;br /&gt;
    // with the specified name and modifier&lt;br /&gt;
    i = -1;&lt;br /&gt;
    for (j = 0; j &amp;lt; weapon_table[&amp;quot;actors&amp;quot;].size; ++j) {&lt;br /&gt;
      entry = weapon_table[&amp;quot;actors&amp;quot;][j];&lt;br /&gt;
      float points_for_next_transition = entry[&amp;quot;value&amp;quot;];&lt;br /&gt;
      //&lt;br /&gt;
      if (this-&amp;gt;weapon_points &amp;gt; points_for_next_transition &amp;amp;&amp;amp;&lt;br /&gt;
          weapon_to_look_up == entry[&amp;quot;name&amp;quot;] &amp;amp;&amp;amp;&lt;br /&gt;
          convert_to_modifier(entry[&amp;quot;plus&amp;quot;]) == required_modifier) {&lt;br /&gt;
        i = j;&lt;br /&gt;
        break;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    //&lt;br /&gt;
    if (i == -1)&lt;br /&gt;
      continue;&lt;br /&gt;
    //&lt;br /&gt;
    do {&lt;br /&gt;
      entry = weapon_table[&amp;quot;actors&amp;quot;][i];&lt;br /&gt;
      //&lt;br /&gt;
      // not_rank_up means there is no link between weapons;&lt;br /&gt;
      // this table is just used to look up modifiers.&lt;br /&gt;
      // so go down the list until there are no more entries for the requested weapon&lt;br /&gt;
      // or until we reach a modifier that requires more points.&lt;br /&gt;
      if (weapon_table[&amp;quot;not_rank_up&amp;quot;] &amp;amp;&amp;amp; entry[&amp;quot;name&amp;quot;] != weapon_to_look_up)&lt;br /&gt;
        break;&lt;br /&gt;
      //&lt;br /&gt;
      // otherwise, just go down the list until we reach the end or a weapon which&lt;br /&gt;
      // requires more points. this will possibly upgrade the weapon (e.g. Knight -&amp;gt; Royal).&lt;br /&gt;
      if (this-&amp;gt;weapon_points &amp;lt;= entry[&amp;quot;value&amp;quot;])&lt;br /&gt;
        break;&lt;br /&gt;
      //&lt;br /&gt;
      ++i;&lt;br /&gt;
    } while (i &amp;lt; weapon_table[&amp;quot;actors&amp;quot;].size);&lt;br /&gt;
    //&lt;br /&gt;
    *weapon_to_use_name = entry[&amp;quot;name&amp;quot;];&lt;br /&gt;
    *modifier_to_use = convert_to_modifier(entry[&amp;quot;plus&amp;quot;]);&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;br /&gt;
  return false;  // cannot scale up&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>