Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Falko

Pages: 1 2 3 [4] 5 6 ... 54
46
Suggestions / Re: Quality of UI life
« on: January 09, 2015, 02:44:55 pm »
Am I the only one that sometimes has difficulty telling if an agent is crouched or not?
no need for coding
mod is enough
https://openxcom.org/forum/index.php/topic,2389.msg27804.html#msg27804

47
Tools / Re: OpenXCom Modding Tools
« on: January 08, 2015, 12:19:46 am »
there is no im/export of world.dat files i will take a look at making a im/export between rul and world.dat format

48
Work In Progress / Re: palette RGB values in text format
« on: December 31, 2014, 08:57:16 pm »
i am currently a bit busy (and not capable -> slooowwww internet) to do much
i can upload the palettes in text form sometimes next week
to the xcom1 txt file i saw here thats a bit screwed in my opinion
there is the color "48, 0, 0," three times - the color data generated from the palette data (for ufo battlscape) from warboy there are no color indices with the same values as mentioned here https://openxcom.org/forum/index.php/topic,1321.msg32646.html#msg32646
if the 3 options that is talked about here that is in regard to this topic
https://openxcom.org/forum/index.php/topic,2327.msg25051.html#msg25051
davide made 2 conversion styles (with some software) i did one manually for tftd->ufo-battlescape
for some images (like terrain) davides was better for other base images mine looked better

49
Work In Progress / Re: Mapscript Questions
« on: December 25, 2014, 03:48:51 pm »
without the map failes or even the full script my geuss would be that this first command does not work
do this
make two different 10x10 blocks with group 3 and 4
use this script 
Code: [Select]
    - type: addBlock
      groups: 2
      label: 1005
      #- type: addUFO
      #- type: addCraft
      #test: if conditionals fit make it a 1 blocktype only map (for visual conditional tests)
      - type: fillArea
        groups: 3
        conditionals: [1005]
      - type: fillArea
        groups: 4
        conditionals: [-1005]
in theory it should alway give a map filled with group3 blocks + one group 2 block
if that always crashes the first command is never executed
next try would be to define the blocksize because width != length
Code: [Select]
    - type: addBlock
      groups: 2
      size: [1, 2] #or [2,1] ?

50
Released Mods / Re: [COMPILATION][RESEARCH] FMP Core/Tech Tree part
« on: December 25, 2014, 02:00:24 am »
"how do you set an alien base command centre?"
take a look at the existing scripts
first part:
Code: [Select]
- type: ALIENBASE
    commands:
    - type: addBlock
      groups: 2
      executions: 2
    - type: addBlock
      size: 2
      groups: 3
and
Spoiler:
Code: [Select]
- name: UBASE
    mapDataSets:
      - BLANKS
      - U_BASE
      - U_WALL02
      - U_PODS
      - BRAIN
    mapBlocks:
      - name: UBASE_00
        width: 20
        length: 20
        groups: 3
      - name: UBASE_01
        width: 20
        length: 20
      - name: UBASE_02
        width: 20
        length: 20
      - name: UBASE_03
        width: 20
        length: 20
        items:
          STR_ELERIUM_115:
            - [2, 14, 1]
      - name: UBASE_04
        width: 10
        length: 10
        groups: 2
        revealedFloors: 1
      - name: UBASE_05
        width: 10
        length: 10
      - name: UBASE_06
        width: 10
        length: 10
      - name: UBASE_07
        width: 10
        length: 10
        groups: 1
      - name: UBASE_08
        width: 10
        length: 10
      - name: UBASE_09
        width: 10
        length: 10
      - name: UBASE_10
        width: 10
        length: 10
      - name: UBASE_11
        width: 10
        length: 10
#       UBASE_12 is impassable, 13 and 14 are apparently unused.
#       in the interest of preserving an original experience,
#       they have been disabled by being added to group 5, which is unused in the scripts.
      - name: UBASE_12
        width: 10
        length: 10
        groups: 5
      - name: UBASE_13
        width: 10
        length: 10
        groups: 5
      - name: UBASE_14
        width: 10
        length: 10
        groups: 5
      - name: UBASE_15
        width: 20
        length: 20
        groups: 4
it adds two blocks of group 2 and one of group 3
if you take a look at the asignemnt in the terrains only the commandcenter ubase_00 has type 3 so its always placed the xcom placement ubase=04 is group2 ans with executions:2 is placed two times before the map is filled with other blocks
its a bit confusing because normally the types 2-4 are the default groups used by the addlines command for roads here these numbers are used for different stuff but it works fine because no addline commands in the alinebase script
Falko, why is it
Code: [Select]
        groups: [2]Instead of
Code: [Select]
        groups: 2?

a terrain can be member of multiple groups
internally all "just a number" group declarations are converted into a list
and i like to be consistent instead of jumping between sometimes list sometimes number i prefer only list
but you can use "just number" without a problem
And why did you leave
Code: [Select]
        type: 2in the ruleset?

to make it somwhat workable with old and new nightlies/1.0
And what's the deal with all that mapScripts stuff, like "direction: vertical", "addBlock" and so on?

addline has a direction parameter it can be used for roads in a terror site with only vertical or only horicontal or both directions
addblock tries to put a block in a free space in a map
lets take a look at the first aiienbase command
Code: [Select]
     - type: addBlock
      groups: 2
      executions: 2
it adds a block of group "2" two times (executions :2)
what terrainblock is group 2 is defined in terrains
you can do more stuff with executionchances, condinal , freq(uencies) max( occurances),....
Apparently you learned this from somewhere, so.
pestering warboy and trying stuff for myself :)
TLDR, if the Ufopaedia article is made useful, I'll gladly fix the maps. Right now, I can't see this happening.

i would say the mapscript needs its own page describing how conditionals groups, labels  terrain ,.. interacts with each other is IMHO more than the already long ruleset-file description site needs

51
Released Mods / Re: [COMPILATION][RESEARCH] FMP Core/Tech Tree part
« on: December 21, 2014, 09:36:24 am »
I wonder why not crashed UFOs end up their harsh landing in buildings? Afterall it could easily happen, not true?
that would happen if the ufo crashes in a terrain with buildings what they do not do (by default)

52
Suggestions / Re: more advanced map scripting (for vanilla)
« on: December 21, 2014, 08:35:17 am »
yeah that was sloppy copy pasting on my part :(
as i explained in my wall of text regareding map resize here
https://openxcom.org/forum/index.php/topic,3138.msg36694.html#msg36694
...
but why using executionChances: 50 insted of the 33% we declared above?
the commands are executed one after another so if you create 100 maps the first command will (on average) convert 33 of them into 7x7 maps
if i convert the remaining 67 maps with e 33% executionchance i get 33,22,45
with 50% chance i get 33,33,34 distribution...

53
Suggestions / Re: StatStrings
« on: December 19, 2014, 12:34:30 am »
statstrings change with the soldier
so you see you have a new sharpshooter/heavy lifter/psi master in your ranks without going through the statscreen every two weeks

54
Suggestions / Re: stealth UFO and instant ground missions
« on: December 18, 2014, 12:48:34 pm »
are you talking about the
missed shooting down
=> landed ufo undetectable
=> high negative score
so let the ufo sit for 10 or 20 days to get its high negative score
that way its not a spike in the point graph and even less detectable :)

do grounded (after they got shot down) ufos generate the same points as landed ones?

55
Suggestions / Re: stealth UFO and instant ground missions
« on: December 17, 2014, 01:05:38 pm »
its one code-solution for one mod idea
if i would care about this i would do something like this
a default value like
groundvisibility: -30
airvisibility: 0
Code: [Select]
   int visibility = {airvisibility};
   if (_altitude == "STR_GROUND")
      visibility = {groundvisibility};
that would allow setting it to 100/-100
but also allow reverse missions like this
very good detections on air
NO detection on ground
high negative score if you dont catch it (ufo lands)
so you have to catch it or without hyperwave at least attempt to intercept all ufos

56
Suggestions / Re: more advanced map scripting (for vanilla)
« on: December 15, 2014, 07:28:47 pm »
Code: [Select]
      - type: addBlock
        label: 2001
        size: 1
        rects:
          - [0, 0, 1, 1]
        executionChances: 33
      - type: addBlock
        label: 2002
        size: 1
        rects:
          - [0, 0, 1, 1]
        executionChances: 33
        conditionals: [-2001]
      - type: addBlock
        label: 2003
        size: 1
        rects:
          - [0, 0, 1, 1]
        conditionals: [-2001, -2002]
      - type: removeBlock
        rects:
          - [0, 0, 1, 1]
###2001=true => script1 2002=true=>script2 2003=true =>script3
#just put         conditionals: [2001,..] to each script one block


57
Open Feedback / Re: List of DrawRoutines?
« on: December 14, 2014, 06:40:19 pm »
fixed wiki https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_%28OpenXcom%29#Armor
if you have problems why not upload the image/rulfile you are using
or are you using this thrread to talk with yourself ? :)

58
Troubleshooting / Re: Where's the Debug option?
« on: December 11, 2014, 12:59:26 am »

59
Work In Progress / Re: having trouble getting new language files to work
« on: December 10, 2014, 11:56:05 pm »
go here
https://falkooxc2.pythonanywhere.com/rulcheck
open rulefile
copypaste your file there ->save-close
test
this time: "property defined multiple times: ['extraStrings']"

instead of
Code: [Select]
extraStrings:
  - type: en-GB
    strings:
      STR_STUN_HE_BOMB: "Explosive Bomb"
..
extraStrings:
  - type: en-US
    strings:
      STR_STUN_HE_BOMB: "Explosive Bomb"
..
extraStrings:
  - type: es-419
    strings:
      STR_STUN_HE_BOMB: "Bomba detonante"
..
extraStrings:
  - type: es-ES
    strings:
      STR_STUN_HE_BOMB: "Bomba detonante"
..
extraStrings:
  - type: fr
    strings:
      STR_STUN_HE_BOMB: "Bombe explosive"
..
extraStrings:
  - type: ja
    strings:
      STR_STUN_HE_BOMB: "爆薬爆弾"
..
use
Code: [Select]
extraStrings:
  - type: en-GB
    strings:
      STR_STUN_HE_BOMB: "Explosive Bomb"
..
  - type: en-US
    strings:
      STR_STUN_HE_BOMB: "Explosive Bomb"
..
  - type: es-419
    strings:
      STR_STUN_HE_BOMB: "Bomba detonante"
..
  - type: es-ES
    strings:
      STR_STUN_HE_BOMB: "Bomba detonante"
..
  - type: fr
    strings:
      STR_STUN_HE_BOMB: "Bombe explosive"
..
  - type: ja
    strings:
      STR_STUN_HE_BOMB: "爆薬爆弾"
..

60
Work In Progress / Re: Mapscript Questions
« on: December 10, 2014, 06:52:33 pm »
looks good/helpfull@Hobbes

with the newest nightly (thx warboy) it is possible to make a random map resize depending on existing mapsize
this is what i want to explain for now
i underline the words i explain a bit more in the text so the reader can find these parts easier
it also is useful as an explanation how label, conditionals and executionChances work
i use the FARM terrain here so the rul file alone should be enough to test things
i will now explain my approach in testing mapscript and go from smaller steps to the full script at the end there is the full code if you dont want to read this stuff
i just make a new ufo-battle with farm as terrain the principle is usable for all maps
ok whats label?
https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_%28OpenXcom%29#Map_Scripts says
Quote
A numeric label that can be used for conditional execution of commands. Each label should be unique within the command list (0=default no need for uniqueness).
so any command can have a label - if the command is executed successfully (at least once) this label gets a "true" value
not yet executed or failed labels have a "false" value
so here we add a 10x10 mapblock at the position 4,4 and give the command 1005 as label
Code: [Select]
      - type: addBlock
        label: 1005
        size: 1
        rects:
          - [4, 4, 1, 1]
since counting starts with 0 a block can only be placed at 4,4 if the map is at least 5x5
farm maps come in 4x4 and 5x5 version depending on ufo size
here i made a simple test for mapsize
it adds the 4,4 block; the craft and the ufo
after that we use conditionals
Code: [Select]
      - type: fillArea
        conditionals: [1005]
..
      - type: fillArea
        conditionals: [-1005]
only one of these commands will be executed
one of them (placement failed = negative labelnumber) fills the map normally
the other (placement succeded = positive labelnumber) fills the map with just one blocktype
Code: [Select]
  - type: FARM
    commands:
      #try to add a block at 4,4 position (label 1005) = test for 5x5 map
      - type: addBlock
        label: 1005
        size: 1
        rects:
          - [4, 4, 1, 1]
      - type: addUFO
      - type: addCraft
      #test: if conditionals fit make it a 1 blocktype only map (for visual conditional tests)
      - type: fillArea
        blocks: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
        maxUses: [300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        freqs: [300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        conditionals: [1005]
      - type: fillArea
        blocks: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
        maxUses: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
        conditionals: [-1005]

testing this you will see all medium/small scouts are in normal terrain and all bigger ufos are in a one-type-block terrain (ufo, craft and the 4,4 corner are different)
now we know 1005=true means its a 5x5 map (assuming thats the miximum size for FARM terrain)
i admit i do not know if modder can add ufos bigger than STR_BATTLESHIP and if the starting mapsize grows with it (if yes one need to accomodate for this)

so now we cant just do
addblock ...
if 1005==true: resize..
because resizing with a (partially) filled map is not allowed
so we delete the 4,4-"testblock" (FYI there was a small error in the code that was fixed in the latest nightly)

Code: [Select]
      - type: addBlock
        label: 1005
        size: 1
        rects:
          - [4, 4, 1, 1]
      #if sucess (1005) delete block
      - type: removeBlock
        rects:
          - [4, 4, 1, 1]
        conditionals: [1005]

now we have a empty map and can do the resizing
i keep it simple
4x4 map should have 33% chance to grow to 6x6
4x4 map should have 33% chance to grow to 5x5
4x4 map should have 33% chance to stay the same size
5x5 map should have 33% chance to grow to 7x7
5x5 map should have 33% chance to grow to 6x6
5x5 map should have 33% chance to stay the same size

short explanation to the resize command
in most cases you just reset the x/y values but you can also  resize the height (size: [6,6,8])
we give the execution a propability of 33% (executionChances: 33) to resize the map to 7x7 if its a 5x5 map (1005==true)
also saving the result of that chance-execution into the label 1507 is important (the label 1507 is arbitrary hint: - 5x5 map resized to 7x7)
Code: [Select]
      #if 5x5 map 33% to make it 7x7 map
      - type: resize
        label: 1507
        size: [7,7]
        executionChances: 33
        conditionals: [1005]

in the next step we use 2 conditionals we want to resize the map to 6x6 ONLY if it starts at 5x5 (1005==true) and the 7x7 resize failed (1507==false)
so we put two number in the conditionals: [1005, -1507]
but why using executionChances: 50 insted of the 33% we declared above?
the commands are executed one after another so if you create 100 maps the first command will (on average) convert 33 of them into 7x7 maps
if i convert the remaining 67 maps with e 33% executionchance i get 33,22,45
with 50% chance i get 33,33,34 distribution
Code: [Select]
      #if 5x5 map 33%=(100-33)*0.5 to make it 6x6 map else it is not resized
      - type: resize
        label: 1506
        size: [6,6]
        executionChances: 50
        conditionals: [1005, -1507]

i do not need a command for "not resizing" if 1507 and 1506 failed
in the next steps i just repeat the same steps for the 4x4 maps but with the assumption of 4x4 (1005==false)

the full script:

Code: [Select]
  - type: FARM
    commands:
      #try to add a block at 4,4 position (label 1005) = test for 5x5 map
      - type: addBlock
        label: 1005
        size: 1
        rects:
          - [4, 4, 1, 1]
      #if sucess (1005) delete block
      - type: removeBlock
        rects:
          - [4, 4, 1, 1]
        conditionals: [1005]
      #if 5x5 map 33% to make it 7x7 map
      - type: resize
        label: 1507
        size: [7,7]
        executionChances: 33
        conditionals: [1005]
      #if 5x5 map 33%=(100-33)*0.5 to make it 6x6 map else it is not resized
      - type: resize
        label: 1506
        size: [6,6]
        executionChances: 50
        conditionals: [1005, -1507]
      #if NOT 5x5 map (=4x4) 33% to make it 6x6 map
      - type: resize
        label: 1407
        size: [6,6]
        executionChances: 33
        conditionals: [-1005]
      #if NOT 5x5 map (=4x4) 33%=(100-33)*0.5 to make it 5x5 map else it is not resized
      - type: resize
        label: 1406
        size: [5,5]
        executionChances: 50
        conditionals: [-1005, -1407]

      - type: addUFO
      - type: addCraft
      #test: if conditionals fit make it a 1 blocktype only map (for visual conditional tests)
      #- type: fillArea
        #blocks: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
        #maxUses: [300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        #freqs: [300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
        #conditionals: [1005]
      - type: fillArea
        blocks: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
        maxUses: [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]
        #conditionals: [-1005]

another approach:
Spoiler:
while writing this i thought about another approach to this
a map should have 33% chance to grow to 6x6
a map should have 33% chance to grow to 5x5
4x4 map should have 33% chance to stay the same size
5x5 map should have 33% chance to grow to 7x7
this approach is shorter but also shows you need to test things for yourself
while this script worked fine for 4x4 map i could not get it to work for 5x5 i got ~10 times a 7x7 map with a starting 5x5 map

Code: [Select]
  - type: FARM
    commands:
      #try to add a block at 4,4 position (label 1005) = test for 5x5 map
      - type: addBlock
        label: 1005
        size: 1
        rects:
          - [4, 4, 1, 1]
      #if sucess (1005) delete block
      - type: removeBlock
        rects:
          - [4, 4, 1, 1]
        conditionals: [1005]
      #33% chance for 5x5
      - type: resize
        label: 2005
        size: [5,5]
        executionChances: 33       
      #if 5x5 resized try 6x6 map 33%=(100-33)*0.5
      - type: resize
        label: 2006
        size: [6,6]
        conditionals: [-2005]
        executionChances: 50
      #if its a 5x5 map (1005) and the 5/6 resize failed make it a 7x7 map else no resize (=4x4 map)
      - type: resize
        label: 2007
        size: [7,7]
        conditionals: [-2005, -2006, 1005]
i have some ideas why that is but it would need further testing

Pages: 1 2 3 [4] 5 6 ... 54