TWLan Forum

Full Version: Kartenverschönerung
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Ich glaube nicht, dass das so einfach wird... aber probieren kann man's immer Wink
Ich denke, ich werde die Map-Deko ziemlich ähnlich wie jetzt übernehmen, vllt. bisschen abändern... mal schaun Wink

LG
Molt
Mach doch die Scrollmap Big Grin
Das wär richtig nice *___*

MfG Manuel
Ich fürchte mich nur schon davor, mir den DS-Code dazu anzusehen... ^^
Ich mach erst mal die neue Grafik fertig, dann seh ich weiter...
ich fänds gut. vielleicht setzt ihr die ja in die 1.5 mit rein, ich fänds super!
Me 2 aber jetzt mal b2t
(15.06.2011, 13:23)Molt Wrote: [ -> ]Ich fürchte mich nur schon davor, mir den DS-Code dazu anzusehen... ^^
Ich mach erst mal die neue Grafik fertig, dann seh ich weiter...

Depp Big Grin
Das war nur ein Joke. Hab mir das mal angeschaut :O
Glaub mir, ich wüsste nich mal wo ich anfang O.O

MfG Manuel
(15.06.2011, 22:38)SlimShady95 Wrote: [ -> ]Depp Big Grin
Das war nur ein Joke. Hab mir das mal angeschaut :O
Glaub mir, ich wüsste nich mal wo ich anfang O.O

MfG Manuel

Düto Smile

so far
Yannici
könnte mal jemand seine gamemap.tpl posten?
ich bekomm immer irgend welche "fatalfehler".
Hat das jemand richtig und könnte mir das im Spoiler posten?

wäre toll.

viele grüße
also das is meine unveränderte von der aio 1.9 :
diese erzeugt bei mir diesen fehler:
[Image: g7d6-14.png]


Könntest du es einfach in meine tpl einfügen?
Poste mal deine tpl hier, dann mach ich den Code da rein Wink
ist bereits, im anderen.
Code:
<div id="info" style="position:absolute; top:0px; left:0px; width:350px; visibility: hidden; z-index:10;">
<table id="info_content" class="vis" style="background-color: #F0E6C8;">
<tr><td rowspan="13" id="bonusbild"></td>
<th colspan="2" id="info_title">title</th></tr>
<tr><td id="bonus" colspan="2"></td></tr>
<tr><td>{$lang->get("points")}:</td><td id="info_points">points</td></tr>
<tr id="info_owner_row"><td>{$lang->get("owner")}:</td><td id="info_owner">owner</td></tr>
<tr id="info_left_row"><td colspan="2">{$lang->get("left")}</td></tr>
<tr id="info_ally_row"><td>{$lang->get("tribe")}:</td><td id="info_ally">ally</td></tr>
<tr id="info_village_groups_row"><td>{$lang->get("groups")}:</td><td id="info_village_groups">village_groups</td></tr>
</table>
</div>

<h2>{$lang->get("continent")} {$continent}</h2>

<table collspacing="1" collpadding="0"><tr><td valign="top">

    <table><tr><td valign="top"><table cellspacing="1" cellpadding="0" style="background-color: #DED3B9; border: 1px solid rgb(0, 0, 0);"><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-$map.size+1}&amp;y={$map.y+$map.size-1}"><img src="graphic/map/map_nw.png" style="z-index:1; position:relative;" alt="map/map_nw.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x}&amp;y={$map.y+$map.size-1}"><img src="graphic/map/map_n.png" style="z-index:1; position:relative;" alt="map/map_n.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+$map.size-1}&amp;y={$map.y+$map.size-1}"><img src="graphic/map/map_ne.png" style="z-index:1; position:relative;" alt="map/map_ne.png"/></a></td></tr><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-$map.size+1}&amp;y={$map.y}"><img src="graphic/map/map_w.png" style="z-index:1; position:relative;" alt="map/map_w.png"/></a></td><td>
    
        <table style="background-color: #F1EBDD; border: 1px solid #F1EBDD;" cellspacing="0" cellpadding="0" class="map">
{php}
require('include/config.php');
$algo_value = sin($config['speed']) * pi();
$deco_type = array();
$deco = array();
$deco_x = $this->_tpl_vars['x_coords'];
$deco_y = $this->_tpl_vars['y_coords'];
array_unshift($deco_x, $deco_x[0] - 1);
array_unshift($deco_y, $deco_y[0] - 1);
array_push($deco_x, $deco_x[count($deco_x) - 1] + 1);
array_push($deco_y, $deco_y[count($deco_y) - 1] + 1);
foreach($deco_y as $y)
{
foreach($deco_x as $x)
{
  if(isset($deco_type[$x][$y]))
  {
   continue;
  }
  $deco_type[$x][$y] = "gras";
  $current_algo = sin($x * $y + $algo_value);
  if(0 <= $current_algo && $current_algo < 0.1)
  {
   $deco_type[$x][$y] = "see";
   $deco[$x][$y] = 'see.png';
  }
  elseif(0.1 <= $current_algo && $current_algo < 0.3)
  {
   if(!$this->_tpl_vars['cl_map']->getVillage($x+1,$y) && !$this->_tpl_vars['cl_map']->getVillage($x,$y+1) && !$this->_tpl_vars['cl_map']->getVillage($x+1,$y+1)
    && !isset($deco[$x+1][$y]) && !isset($deco[$x][$y+1]) && !isset($deco[$x+1][$y+1]))
   {
    $deco_type[$x][$y] = "berg";
    $deco_type[$x+1][$y] = "berg";
    $deco_type[$x][$y+1] = "berg";
    $deco_type[$x+1][$y+1] = "berg";
    $deco[$x][$y] = "berg4.png";
    $deco[$x+1][$y] = "berg1.png";
    $deco[$x][$y+1] = "berg3.png";
    $deco[$x+1][$y+1] = "berg2.png";
   }
  }
  elseif(0.3 <= $current_algo && $current_algo < 1)
  {
   $deco_type[$x][$y] = "forest";
  }
}
}
foreach($deco_y as $y)
{
foreach($deco_x as $x)
{
  switch ($deco_type[$x][$y])
  {
    case "gras":
        $deco[$x][$y] = 'gras'.rand(1,4).'.png';
        break;
    case "forest":
        $first = 0;
        $second = 0;
        $third = 0;
        $fourth = 0;
        if($deco_type[$x][$y-1] == "forest")
        {
            $first = 1;
        }
        if($deco_type[$x-1][$y] == "forest")
        {
            $second = 1;
        }
        if($deco_type[$x][$y+1] == "forest")
        {
            $third = 1;
        }
        if($deco_type[$x+1][$y] == "forest")
        {
            $fourth = 1;
        }
        $deco[$x][$y] = 'forest'.$first.$second.$third.$fourth.'.png';
        break;
  }
}
}
{/php}    
        {foreach from=$y_coords item=y}
            <tr>
                <td width="20">{$y}</td>
                
            {foreach from=$x_coords item=x}
                {if !$cl_map->getVillage($x,$y)}
<td id="tile_{$x}_{$y}" class="{$cl_map->getClass($x,$y)}">
{php}
echo '<img src="graphic/map/'.$deco[$this->_tpl_vars['x']][$this->_tpl_vars['y']].'" alt="" />';
{/php}
</td>
                {else}
                    <td id="tile_{$x}_{$y}" class="{$cl_map->getClass($x,$y)}" style="background-color:rgb({$cl_map->getColor($x,$y)})"><a href="game.php?village={$village.id}&amp;screen=info_village&amp;id={$cl_map->getvillageid($x,$y)}"><img src="graphic/map/{php}$bild = $this->_tpl_vars['cl_map']->graphic($this->_tpl_vars[x],$this->_tpl_vars[y]);if (get_bonus($this->_tpl_vars[x], $this->_tpl_vars[y])){$bild = str_replace('v', 'b', $bild);}echo $bild;{/php}" onmouseover="map_popup('{$cl_map->getVillage($x,$y,"name")} ({$x}|{$y}) K{$cl_map->getcon($x,$y)}', {$cl_map->getvillage($x,$y,points)}, {$cl_map->playerinfo($x,$y)}, {$cl_map->getally($x,$y)}, false, {$x}, {$y}, {$village.id}, {$cl_map->getvillage($x,$y)})" onmouseout="map_kill()" alt="" /></a></td>    
                {/if}
            {/foreach}
            
            </tr>
        {/foreach}
            
        <tr>
            <td height="20"></td>
            {foreach from=$x_coords item=x}
                <td>{$x}</td>
            {/foreach}
    </tr></table></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+$map.size-1}&amp;y={$map.y}"><img src="graphic/map/map_e.png" style="z-index:1; position:relative;" alt="map/map_e.png"/></a></td></tr><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-$map.size+1}&amp;y={$map.y-$map.size+1}"><img src="graphic/map/map_sw.png" style="z-index:1; position:relative;" alt="map/map_sw.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x}&amp;y={$map.y-$map.size+1}"><img src="graphic/map/map_s.png" style="z-index:1; position:relative;" alt="map/map_s.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+$map.size-1}&amp;y={$map.y-$map.size+1}"><img src="graphic/map/map_se.png" style="z-index:1; position:relative;" alt="map/map_se.png"/></a></td></tr></table></td><td valign="top">
    
    </td></tr></table>
    
</td><td valign="top">

    <table><tr><td valign="top"><table cellspacing="1" cellpadding="0" style="background-color: #DED3B9; border: 1px solid rgb(0, 0, 0);"><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-50}&amp;y={$map.y+50}"><img src="graphic/map/map_nw.png" style="z-index:1; position:relative;" alt="map/map_nw.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x}&amp;y={$map.y+50}"><img src="graphic/map/map_n.png" style="z-index:1; position:relative;" alt="map/map_n.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+50}&amp;y={$map.y+50}"><img src="graphic/map/map_ne.png" style="z-index:1; position:relative;" alt="map/map_ne.png"/></a></td></tr><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-50}&amp;y={$map.y}"><img src="graphic/map/map_w.png" style="z-index:1; position:relative;" alt="map/map_w.png"/></a></td><td>

    <form method="POST" action="game.php?village={$village.id}&screen=map&action=bigMapOnclick">    
        <input type="hidden" name="startX" id="startX" value="{$xs}" />
        <input type="hidden" name="startY" id="startY" value="{$ys}" />
        <div style="position:relative; padding:0px">
            <div style="position:absolute;z-index:100">
                <input type="image" class="noneStyle" src="graphic/map/empty.png" style="width:251px;height:250px;margin:0px;padding:0px" />
            </div>
            <img src="graphic/continent/{$user.id}-{$conmap}-{$contime}.png">
            <div id="bigMapRect" style="z-index:10; position:absolute; top:{$bigMapRectTop}px; left:{$bigMapRectLeft}px; width:{$mapSize*5-1}px; height:{$mapSize*5-1}px; border: 1px solid rgb(213, 227, 174);"></div>
        </div>
    </form>
    
    </td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+50}&amp;y={$map.y}"><img src="graphic/map/map_e.png" style="z-index:1; position:relative;" alt="map/map_e.png"/></a></td></tr><tr><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x-50}&amp;y={$map.y-50}"><img src="graphic/map/map_sw.png" style="z-index:1; position:relative;" alt="map/map_sw.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x}&amp;y={$map.y-50}"><img src="graphic/map/map_s.png" style="z-index:1; position:relative;" alt="map/map_s.png"/></a></td><td align="center"><a href="game.php?village={$village.id}&amp;screen=map&amp;x={$map.x+50}&amp;y={$map.y-50}"><img src="graphic/map/map_se.png" style="z-index:1; position:relative;" alt="map/map_se.png"/></a></td></tr></table></td><td valign="top">
    </td></tr></table>
<br />
<form action="game.php?village={$village.id}&amp;screen=map" method="post">
<table>
<tr><td>x: <input type="text" name="x" value="{$map.x}" size="5" /> y:<input type="text" name="y" value="{$map.y}" size="5" /></td>
<td><input type="submit" value="&raquo; OK &laquo;" style="font-size: 10pt;" /></td>
</tr></table>
</form>
</td>
</tr></table>
<table style="border: 1px solid ; background-color: #DED3B9; margin-left: 2px;">
<tbody>
<tr class="nowrap">
<td/>
<td width="10" style="background-color: rgb(255, 255, 255);"/>
<td class="small">{$lang->get("village_now")}</td>
<td width="10" style="background-color: rgb(240, 200, 0);"/>
<td class="small">{$lang->get("own_villages")}</td>
<td width="10" style="background-color: rgb(0, 0, 244);"/>
<td class="small">{$lang->get("own_tribe")}</td>
<td width="10" style="background-color: rgb(150, 150, 150);"/>
<td class="small">{$lang->get("left_villages")}</td>
<td width="10" style="background-color: rgb(180, 0, 0);"/>
<td class="small">{$lang->get("other_villages")}</td>
</tr>
<tr class="nowrap">
<td class="small">{$lang->get("tribe")}:</td>
<td width="10" style="background-color: rgb(0, 160, 244);"/>
<td class="small">{$lang->get("bnd")}</td>
<td width="10" style="background-color: rgb(128, 0, 128);"/>
<td class="small">{$lang->get("nap")}</td>
<td width="10" style="background-color: rgb(244, 0, 0);"/>
<td class="small">{$lang->get("enemies")}</td>
</tr>
</tbody>
</table>
Jippi!

Danke. (:
Danke!!! 5*
BUG : zusammen mit "Dörfer Markieren" funktioniert die Kartenverschönerung nicht.


viele grüße
Doch. Du musst nur die Dateien richtig zusammenfügen.

MfG Manuel
und wie? Wink
Pages: 1 2