{% extends "layout.html" %} {% from 'modalaceedit.html' import modal_ace_edit_head %} {% from 'modalaceedit.html' import modal_ace_edit_body %} {% from 'modalaceedit.html' import modal_ace_edit_button %} {% from 'modalaceedit.html' import modal_ace_edit_jsfooter %} {% set yamleditors={ "options":{ "textidstring":"yamloptions", "varstring":"optionsstring", "modalidstring":"modaloptionsid", "title":"Set Colors for textures", "editorvar":"editoroptions", "buttontext":"Open options", "buttonidstring":"yamloptionsbuttonid", "contentid":"optionstext" },"exportrul":{ "textidstring":"yamlexport", "varstring":"exportstring", "modalidstring":"modalexportid", "title":"The exported Rul-File", "editorvar":"editorexport", "buttontext":"Open Export", "buttonidstring":"yamlexportbuttonid", "contentid":"exporttext" },"importrul":{ "textidstring":"yamlimport", "varstring":"importstring", "modalidstring":"modalimportid", "title":"The imported Rul-File", "editorvar":"editorimport", "buttontext":"Open Import", "buttonidstring":"yamlimportbuttonid", "contentid":"importtext" } } %} {% block title %}World Editor{% endblock %} {% block head %} {{ modal_ace_edit_head(yamleditors) }} {% endblock %} {% block content %} {% for acekey in yamleditors %} {{ modal_ace_edit_body(yamleditors[acekey]) }} {% endfor %}
How to change the world?
You can change/create landmasses and change their terrain, draw new borders, change the reach of regions or missionzones or add new countries and cities
checks
this adds more background maps you can enable them by clicking on be aware that these maps are big and you need a fast internet connection to use these you get night lights and a bunch of planets other than earth
- This is an alternative method to select Maps and visible Layers - using this form and this form at the same time can lead to confusing / inconsistent visualisation
lon resolutionlat resolution
This Function creates 1-point landing zones (missionzone3) for terror missions in all cities that do not already have these
{{ modal_ace_edit_button(yamleditors["options"]) }} you can change the color and number of textures here
more to come ..?!
or {{ modal_ace_edit_button(yamleditors["importrul"]) }} {{ modal_ace_edit_button(yamleditors["exportrul"]) }}or
{% endblock %} {% block jsfooter %} $(document).ready(function() { $("#option").select2({width: "90px", dropdownAutoWidth: 'false',minimumResultsForSearch: -1}); }); $(document).ready(function() { $("#extraoption").select2({dropdownAutoWidth: 'true',minimumResultsForSearch: -1}); }); //$(document).ready(function() { $("#region-region").select2({dropdownAutoWidth: 'true',minimumResultsForSearch: -1}); }); //$(document).ready(function() { $("#region-city").select2({dropdownAutoWidth: 'true',minimumResultsForSearch: -1}); }); function togglebutton(string,s1,s2){ $("#"+string).prop('checked',! $("#"+string).prop('checked')); if ($("#"+string).prop('checked')){ $("#"+string+"button").addClass( "btn-warning" ); $("#"+string+"button").html( s1); }else{ $("#"+string+"button").removeClass( "btn-warning" ); $("#"+string+"button").html( s2); } } $(document ).on('click','#enable-texturebutton' ,function() { togglebutton("enable-texture","edit","no edit"); enable_edit_texture(); if ($("#enable-texture").prop('checked')){ $("#snapcollapse").removeClass( "hidden" ); $("#texselcollapse").removeClass( "hidden" ); }else{ $("#snapcollapse").addClass( "hidden" ); $("#texselcollapse").addClass( "hidden" ); } }); $(document ).on('click','#enable-texturesnapbutton' ,function() { togglebutton("enable-texturesnap","snap","no snap"); enable_edit_texturesnap(); }); $(document ).on('click','#enablenewtexture' ,function() { enable_new_texture(); }); $(document ).on('click','#enable-borderbutton' ,function() { togglebutton("enable-border","edit","no edit"); enable_edit_border(); }); $(document ).on('click','#enablenewborder' ,function() { enable_new_border(); }); $(document ).on('click','#enable-regionbutton' ,function() { togglebutton("enable-region","edit","no edit"); enable_edit_region(); }); $(document ).on('click','#enablenewregion' ,function() { enable_new_region(); }); $(document ).on('click','#enable-citybutton' ,function() { togglebutton("enable-city","edit","no edit"); enable_edit_city(); }); $(document ).on('click','#enablenewcity' ,function() { enable_new_city(); $("#newcityname").val( "STR_NEWCITYNAME_"+citycounter ); citycounter++; $("#cityregcollapse").removeClass( "hidden" ); }); $(document ).on('click','#enable-countriesbutton' ,function() { togglebutton("enable-countries","edit","no edit"); enable_edit_countries(); }); $(document ).on('click','#enablenewcountries' ,function() { enable_new_countries(); countrycounter++; //$("#countriesregcollapse").addClass( "in" ); }); $(document ).on('click','#enable-missionzonebutton' ,function() { togglebutton("enable-missionzone","edit","no edit"); enable_edit_missionzone(); }); $(document ).on('click','#enablenewmissionzone' ,function() { enable_new_missionzones(); }); $(document ).on('click','#moremapsbutton', function() { $("#moremapsbutton").removeClass( "btn-warning" ); $("#moremapsbutton").addClass( "btn-success" ); $("#moremapsbutton").prop('disabled', true); $("#moremapsbutton").html('more maps '); addmoremaps(); }); $(function () { $(".btn").tooltip(); }); $(function () { $("range").tooltip(); }); $(document ).on('click','#importbutton' ,fillmap); $(document ).on('click','#exportbutton' ,exportmap); $(document ).on('click','#downloadfile' ,function() { saveAs(new Blob([exportstring], { type: "text/plain;charset=utf-8;", }), "newworld.rul"); }); $('#uploadfile').bootstrapFileInput(); $(document ).on('change','#uploadfile' ,function(event) { var files = event.target.files; //FileList object for (var i = 0; i < files.length; i++) { var file = files[i]; var picReader = new FileReader(); picReader.addEventListener("load", function(event) { var textFile = event.target; console.log(textFile); editorimport.setValue(textFile.result); importstring=editorimport.getValue(); }); picReader.readAsText(file); } }); $(document ).on('click','#checkterrorbutton' ,checkterror); $(document).on('click','#FillUpPlanet' ,function(){ textures.destroyFeatures(); texgraphicZIndex=0; latinc=parseInt($("#FillUpPlanet-lat").val()); loninc=parseInt($("#FillUpPlanet-lon").val()); trianglepole=$("#FillUpPlanet-pole").prop('checked'); col=$("#FillUpPlanet-col").val(); if (trianglepole){ redrawlon=-180; while(redrawlon<180){ points=[]; points.push(new OpenLayers.Geometry.Point(0,90)); points.push(new OpenLayers.Geometry.Point(redrawlon,90-latinc)); points.push(new OpenLayers.Geometry.Point(redrawlon+loninc,90-latinc)); c=col; if (col<0)c=Math.floor(Math.random() * textcolors.length) tmp=new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(points)]),{tn:c},{fillColor: textcolors[c],strokeColor: "#777777",strokeOpacity: 1,strokeWidth: "2",fillOpacity: 0.7,graphicZIndex:texgraphicZIndex}) texgraphicZIndex++; if (! testtex(tmp)){ tmp.style.strokeColor="red"; } textures.addFeatures([tmp]); points=[]; points.push(new OpenLayers.Geometry.Point(0,-90)); points.push(new OpenLayers.Geometry.Point(redrawlon,-90+latinc)); points.push(new OpenLayers.Geometry.Point(redrawlon+loninc,-90+latinc)); c=col; if (col<0)c=Math.floor(Math.random() * textcolors.length) tmp=new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(points)]),{tn:c},{fillColor: textcolors[c],strokeColor: "#777777",strokeOpacity: 1,strokeWidth: "2",fillOpacity: 0.7,graphicZIndex:texgraphicZIndex}) texgraphicZIndex++; if (! testtex(tmp)){ tmp.style.strokeColor="red"; } textures.addFeatures([tmp]); redrawlon=redrawlon+loninc; } } redrawlat=90; redrawlatlimit=-90 if (trianglepole){ redrawlat=redrawlat-latinc; redrawlatlimit=redrawlatlimit+latinc; } while(redrawlat>redrawlatlimit){ redrawlon=-180; while(redrawlon<180){ points=[]; points.push(new OpenLayers.Geometry.Point(redrawlon,redrawlat)); points.push(new OpenLayers.Geometry.Point(redrawlon+loninc,redrawlat)); points.push(new OpenLayers.Geometry.Point(redrawlon+loninc,redrawlat-latinc)); points.push(new OpenLayers.Geometry.Point(redrawlon,redrawlat-latinc)); c=col; if (col<0)c=Math.floor(Math.random() * textcolors.length) tmp=new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(points)]),{tn:c},{fillColor: textcolors[c],strokeColor: "#777777",strokeOpacity: 1,strokeWidth: "2",fillOpacity: 0.7,graphicZIndex:texgraphicZIndex}) texgraphicZIndex++; if (! testtex(tmp)){ tmp.style.strokeColor="red"; } textures.addFeatures([tmp]); redrawlon=redrawlon+loninc; } redrawlat=redrawlat-latinc; } }); $(document ).on('click','#enable-FillUpPlanet-pole' ,function() { $("#FillUpPlanet-pole").prop('checked',! $("#FillUpPlanet-pole").prop('checked')); if ($("#FillUpPlanet-pole").prop('checked')){ $("#enable-FillUpPlanet-pole").text( "Pole region as triangles"); }else{ $("#enable-FillUpPlanet-pole").text("Pole region as blocks"); } }); function fillnewmapselect(){ a=[] b=[] llist=map.getLayersByName(/./) for (li=0;li=0) } } }) {{ modal_ace_edit_jsfooter(yamleditors) }} $(document).ready(doit); {% endblock %} {% block help %}

Group A

Group A Sub 1

dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh

Group A Sub 2

dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh

Group B

Group B Sub 1

dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh

Group B Sub 2

ddkfjg dflgj dfkjghdzjkldhfg djkflghkfjg dflgj dfkjghdzjkldhfg djkflghdkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh

Group C

Group C Sub 1

dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh

Group C Sub 2

dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
dkfjg dflgj dfkjghdzjkldhfg djkflgh
{% endblock %}