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.


Topics - Aldorn

Pages: [1] 2
1
Hi,

I had a look at ruleset definition (really great work!) unfortunately I did not find any answer to my need, so I finally decided to ask here

Context: I modded a facility that allows to train soldiers in different manners. I don't want to use standard system that provides a global improvement of soldiers stats, but provides instead some kind of specialization.

Request: I would like to set a monthly limit (i.e., not possible to train more than 5 soldiers per month)

The facility attribute "trainingRooms" doesn't help as it will allow "combat/martial training", that I want to avoid. In fact, I think some kind of "monthlyLimit" per SoldierTransformation should fit this expectation. I know there are already several such attributes for different puposes, as monthlyBuyLimit, etc. (very useful), but I don't know the level of difficulty ot implement it

I don't know if others may be interetested and if it could be considered as interesting/useful by our dear "developpers"

2
Hi,

I wonder if there is a possibility to apply some kind of "minRank" to items and armors?
Would be useful for example to make powerful weapons/armors require to be sergent or captain to use/wear it

No idea if it's possible to implement this constraint by script, if some of you have ideas how to deal with that request, I'm clearly interested



3
Hi Meridian & Yankes,

Congrats for the amazing job you do every day/week/month/year !

I'm quite sure answer will be NO, anyway I will still ask my question, as this is a request I asked far in the past but was impossible to implement, but I'm still interested by it and potentially it may be possible now in OXCE



Would it be possible to put harcoded values regarding experience awards as parameters we could simply overwrite via ruleset ?

What I have in mind hereafter

Current Code (BattleUnit.cpp)
Spoiler:
int BattleUnit::improveStat(int exp) const
{
   if      (exp > 10) return RNG::generate(2, 6);
   else if (exp > 5)  return RNG::generate(1, 4);
   else if (exp > 2)  return RNG::generate(1, 3);
   else if (exp > 0)  return RNG::generate(0, 1);
   else               return 0;
}


Convert 12 hardcoded values to variables available for overwritting via ruleset

Spoiler:

New Ruleset variables (names to be defined properly, below is just an example):

STR_EXP_TRIGGER1 0
STR_EXP_TRIGGER2 2
STR_EXP_TRIGGER3 5
STR_EXP_TRIGGER4 10

STR_EXP_TRIGGER1_MINRNG 0
STR_EXP_TRIGGER2_MINRNG 1
STR_EXP_TRIGGER3_MINRNG 1
STR_EXP_TRIGGER4_MINRNG 2

STR_EXP_TRIGGER1_MAXRNG 1
STR_EXP_TRIGGER2_MAXRNG 3
STR_EXP_TRIGGER3_MAXRNG 4
STR_EXP_TRIGGER4_MAXRNG 6

New code:

int BattleUnit::improveStat(int exp) const
{
   if      (exp > STR_EXP_TRIGGER1) return RNG::generate(STR_EXP_TRIGGER1_MINRNG, STR_EXP_TRIGGER1_MAXRNG);
   else if (exp > STR_EXP_TRIGGER2)  return RNG::generate(STR_EXP_TRIGGER2_MINRNG, STR_EXP_TRIGGER2_MAXRNG);
   else if (exp > STR_EXP_TRIGGER3)  return RNG::generate(STR_EXP_TRIGGER3_MINRNG, STR_EXP_TRIGGER3_MAXRNG);
   else if (exp > STR_EXP_TRIGGER4)  return RNG::generate(STR_EXP_TRIGGER4_MINRNG, STR_EXP_TRIGGER4_MAXRNG);
   else               return 0;
}

Please don't hurt me if you find this request has no sense  :-[

EDIT: I saw there is now the possibility to play with experience multiplier via scripts, but I'm still interested to have access to these hardoded values

4
Troubleshooting / [CRAFT EQUIPMENT SCREEN] Placement combo issue
« on: August 17, 2014, 11:09:05 am »
I installed a recent nightly build (also openxcom_git_master_2014_08_12_1512) (beware that lots of mods are installed, as making skyranger have only 10 places)

While trying to reorganize Skyranger placement, right clicking on a down arrow to make soldier placed at end of list (screen shot 1), all arrows are pushed to top of screen (screen shot 2)


Making some test on a standard install (i.e. without any mod), issue is different but still there (screen shot 3 and 4) : screen is "emptied"

PS : for both installation, I use "old" dll (I think from 1.0 ?) as they are not provided with nightlies (anymore ?)

5
Suggestions / [MODDING CAPABILITIES] Load a folder of rulesets
« on: August 09, 2014, 03:09:42 am »
It's always difficult to ask for any development, as there are many request, and above all, job done by dev team is absolutely marvellous !

Anyway, it would be nice to have the possibility to load :
- either .rul files inside [Ruleset] folder (as for now)
- or any .rul files inside any subfolder of [Ruleset]

This would be interesting especially for huge mods. As an example, I decided to split my mod by section, and sometimes subsections, and I have around 60 ruleset files...

This way, a modder would have total liberty to organize his work. Subfolder could even include some optional features as zip archives, so that user would just have to extract wanted archives in current subfolder to activate them (and to remove, just have a look at archive to know which file to delete)

6
Suggestions / [WEAPONS] Make BlastRadius efficient for any DamageType
« on: August 04, 2014, 10:11:16 pm »
I made some test and it seems that adding a BlastRadius > 0 to an ammunition of DamageType different from 3 (also High Explosive) does not make any damage.
However, this would be nice to make grenades, rockets, ... of acid/laser/plasma even AP

7
I provide Tanks and Hovertanks for modders who could have some use of it

"turretType:" are given according to related SpriteSheet

Regular :
- Cannon (in Ruleset* : "turretType: 0")
- Grenade Launcher (in Ruleset : "turretType: 2")
- Heavy Machine Gun (in Ruleset : "turretType: 8")
- Rocket Launcher (in Ruleset* : "turretType: 1")

Advanced :
- Gauss Cannon (in Ruleset : "turretType: 2") [turret is not exactly exactly as in SpriteSheet SpriteSheet adapted even if screen shot not updated => V0.4]
- Mass Accelerator Cannon (in Ruleset : "turretType: 9") [turret is not exactly as in SpriteSheet Turret adapted even if screen shot not updated => V0.4]
- Heat-Ray Cannon (in Ruleset : "turretType: 9")
- Laser Cannon (in Ruleset : "turretType: 2") [=> V0.2]

Hovertanks only :
- Plasma And Fusion Hovertank (in Ruleset : resp. "turretType: 3" and "turretType: 4") [=> V0.3]

Wreks are included** [=> V0.4]

Vanilla Wreks are also included if someone need it

I don't remember the owner of the HMG Turret, and can't find him, do not hesitate to send an MP or announce on thread

Thanks to Falko for his python tools  ;)

* : Regular Cannon and Rocket Launcher Turret sprites are provided but of no use ; anyway, if really want to use it, I mentioned the corresponding "turretType:"
** : Wreks are provided for Plasma And Fusion Tanks, even if not modded

8
Open Feedback / Thanks for any new improvement
« on: August 02, 2014, 08:45:59 pm »
And also thanks for this  :)

9
In order to add new facilities, Luke created a nice Security Fortress

He added some windowed walls (don't ask me where he picked them up, as they are different from the UFO base version he used at the beginning)

Unfortunately, they are not displayed in base defense mission

I attached the mod

If anyone want to have a look at it, better is to create a new environment, install mod, and install files from user folder (also options.cfg and battle.cfg) so that the base includes automatically new facilities, also in basescape but in battle generator too

It seems there is an issue with XBASE3 mapDataSet

Attached two screen shots :
- the first one shows the facility in base defense mission
- the second shows it as it should be

For information, some file extension were not uppercase and I corrected this ; I am under Windows but I heard it could be an issue for Linux users. I suppose it is not the cause of the issue as I believe dysfunction appeared before I renamed these files, but I prefer to mention it

Luke has no idea why this XBASE3 is not correctly loaded by the engine

There is no urgency, but we are interesting to know if there is an incompatibility or if it's only an error that can be solved, as we are intended to create more facilities in the future

10
As I experienced it, and not without some difficulties, I thought it could be useful for others, so I try to share a short description on how to build a new BaseScape Facility sprite

A) 1x1 FACILITY

Assuming that we will not build facilities of shape different from square, octogonal or cross !

To Do :
- SpriteFacility has to be designed, referenced under section "extraSprites:", then assigned to "spriteFacility:" attribute under section "facilities:"
- SpriteShape has only to be selected/chosen between vanilla shapes (see below), then assigned to "spriteShape:" attribute under section "facilities:"


1) SpriteFacility

     1.1) Design it
     - without borders
     - of dimensions 24x24 (could be eventually a little bigger, depending if you want to fully cover the wall, but better to make a first version 24x24)
     - in a 32x40 sheet
     - to be positioned in (4,3), given that first is (0,0) !

     1.2) Declare it under "extraSprites:" section, let's say from 100
Code: [Select]
100: MyPath/MyFacility_SpriteFacility.PNG

     1.3) Assign it to "facilitySprite:" attribute
Code: [Select]
spriteFacility: 100


2) SpriteShape

     2.1) Select the adequate shape in vanilla [1,2,3]
     Also :
     - 1 for square, or
     - 2 for octogonal, or
     - 3 for cross

     2.2) Assign it to "facilityShape:" attribute
Code: [Select]
spriteShape: 1


How it works in game

When placing it on BaseScape, engine will use [4 or 5 or 6] for the green shape + new SpriteFacility for the inside

When built, engine will use back [1 or 2 or 3] for the Shape + SpriteFacility for the inside


Example


Security Room (1x1-square)

Spoiler:
facilities:
# Security Room
  - type: STR_SECURITY_ROOM
    spriteShape: 1 #Vanilla Square
    spriteFacility: 100
    buildCost: 200000
    buildTime: 16
    monthlyCost: 20000
    personnel: 5
    storage: 5
    mapName: XBASE_56

extraSprites:
  - type: BASEBITS.PCK
    files:
      100: Resources/Facilities/SecurityRoom_SpriteFacility.PNG



A) 2x2 FACILITY


Assuming that we will build only facilities whose square-shaped !


To Do :
- SpriteFacility has to be designed, referenced under section "extraSprites:", then assigned to "spriteFacility:" attribute under section "facilities:"
- SpriteShape has to be designed, referenced under section "extraSprites:", then assigned to "spriteShape:" attribute under section "facilities:"


1) SpriteFacility

     1.1) Design it in 4 files
     Perhaps should it be done in one big, then split, but I did not experienced it yet ; anyway, I guess it should be easier to work first with a unique big file in order to avoid linking issues
     I tried also to create a unique 128X40 sheet, but it causes a crash, so I assume 4 files are mandatory

          1.1.1) NW corner
          - with borders
          - of dimensions 31x31 (could be eventually a little bigger, depending if you want to fully cover the wall, but better to make a first version 31x31)
          - in a 32x40 sheet
          - to be positioned in (1,1), given that first is (0,0) !

          1.1.2) NE corner
          Same but to be positioned in (0,1), also have to let a 1-sized border line on external shape

          1.1.3) SW corner
          Same but to be positioned in (1,0), also have to let a 1-sized border line on external shape

          1.1.4) SE corner
          Same but to be positioned in (0,0), also have to let a 1-sized border line on external shape

     1.2) Declare them under "extraSprites:" section (let's say from 101 to 104)
Code: [Select]
101: MyPath/MyFacility_SpriteFacility01.PNG
102: MyPath/MyFacility_SpriteFacility02.PNG
103: MyPath/MyFacility_SpriteFacility03.PNG
104: MyPath/MyFacility_SpriteFacility04.PNG

     1.3) Assign it to "facilitySprite:" attribute
Code: [Select]
facilitySprite: 101

2) SpriteShape

     2.1) Create "Building Queue" shapes
     Design them as vanilla BaseBits sprites 13 to 16

     2.2) Declare them under "extraSprites:" section as below
Code: [Select]
105: MyFacility_SpriteShape01.PNG
106: MyFacility_SpriteShape02.PNG
107: MyFacility_SpriteShape03.PNG
108: MyFacility_SpriteShape04.PNG

     2.3) Assign it to "facilitySprite:" attribute as below
Code: [Select]
spriteShape: 101
It has to be 101 and not 105 !


How it works in game

When placing it on BaseScape, engine will use 105 to 108 ; it will also not display the inside, but only the green shape, as for vanilla hangars. In this, behaviour is different from 1x1 facilities

When built, engine will use back 101 to 104 (for shape and facility)

I think we could design SpriteShape to include SpriteFacility without its borders, so that it is displayed as for 1x1 facilities (green shape + the inside)
But the advantage to stay vanilla is that we will be able to reuse easily the 4 SpriteShape files for any other 2x2 facility, just copying and renaming files


Example

Security Fortress (2x2-square)

Spoiler:
facilities:
# Security Fortress
  - type: STR_SECURITY_FORTRESS
    spriteShape: 101 #Building Queue
    spriteFacility: 101 #Basescape and Ufopaedia
    buildCost: 800000
    buildTime: 32
    monthlyCost: 80000
    personnel: 25
    storage: 25
    size: 2
    mapName: XBASE_50

extraSprites:
  - type: BASEBITS.PCK
    files:
      101: Resources/Facilities/SecurityFortress_SpriteFacility01.PNG
      102: Resources/Facilities/SecurityFortress_SpriteFacility02.PNG
      103: Resources/Facilities/SecurityFortress_SpriteFacility03.PNG
      104: Resources/Facilities/SecurityFortress_SpriteFacility04.PNG
      105: Resources/Facilities/SecurityFortress_SpriteShape01.PNG
      106: Resources/Facilities/SecurityFortress_SpriteShape02.PNG
      107: Resources/Facilities/SecurityFortress_SpriteShape03.PNG
      108: Resources/Facilities/SecurityFortress_SpriteShape04.PNG

Warning : Regarding 2x2 facilities, palette is not exactly the same for the first and for the three others  :o


11
A small mod, more for people who are looking for some alternatives at the beginning

Skyspotter
      -> up to 6 soldiers
      -> +100% radar range
Preview here

Skywatcher
      -> up to 10 soldiers
      -> +50% radar range
Preview here

Skytrooper :
      -> up to 18 soldiers
      -> 2 side doors
      -> 2 versions : either WE or GE
Preview here

Skyliner :
      -> up to 22 soldiers but 18 is recommended
      -> 2 side doors
      -> 2 versions : either WE or GE
Preview here

Skycruiser :
      -> up to 26 soldiers but 18 or 20 is recommended depending on version
      -> 4 versions
            - either WE or GE*
            - either 2LD or 4SD
Preview here

Skylander :
      -> up to 30 soldiers but 22 is recommended for LD versions (for SD versions, you will have soldiers directly exposed in any situation)
      -> 4 versions
            - either WE or GE*
            - either 4SD or 2SD + 2 LD
Preview here

Included ruleset is an example of how making them researchable and manufacturable ; Feel free to adapt any property at your convenience...

I don't provide ufopaedia pictures, others are far better for doing this

Meaning :
- GE = Ground Engines ; WE = Wing Engines
- LD = Large Doors ; SD = Small Doors

*: Engines installed under the aircraft (also on the ground) to provide tactical protection for harder mods

12
Troubleshooting / Issue while redefining Ufopaedia entries [CLOSED]
« on: July 29, 2014, 03:29:15 pm »
I was intended to change presentation for alien missions ufopaedia entries as shown here

This works well for new modded alien missions
Regarding vanilla alien missions, it works if and only if I first remove entries from XCom1Ruleset.rul (despite of my mod rulesets being loaded after)

Do I something wrong, or is it just not possible ?

Spoiler:
rulesets:
  - Xcom1Ruleset
  - Aliens_Pick_Up_Weapons
  - UFOextender_Psionic_Line_Of_Fire
  - HellMod_AlienDeployments
  - HellMod_AlienItemLevels
  - HellMod_AlienMissions
  - HellMod_AlienRaces
  - HellMod_Armors
  - HellMod_CraftWeapons
  - HellMod_Crafts
  - HellMod_ExtraStrings
  - HellMod_Facilities
  - HellMod_Invs
  - HellMod_Items
  - HellMod_ItemsExtra
  - HellMod_Language
  - HellMod_Manufacture
  - HellMod_Regions
  - HellMod_Research
  - HellMod_Soldiers
  - HellMod_Starting
  - HellMod_TerrainsAlienDeployments
  - HellMod_TerrainsCBase
  - HellMod_TerrainsCult
  - HellMod_TerrainsCulta
  - HellMod_TerrainsDawnUrbanA
  - HellMod_TerrainsDawnUrbanB
  - HellMod_TerrainsIndustrialUrban
  - HellMod_TerrainsMadUrban
  - HellMod_TerrainsMBase
  - HellMod_TerrainsNativeUrban
  - HellMod_TerrainsPortUrban
  - HellMod_TerrainsUBase
  - HellMod_TerrainsUbase2
  - HellMod_TerrainsUrban
  - HellMod_TerrainsUrban2
  - HellMod_TerrainsUrbanA
  - HellMod_TerrainsUrbania
  - HellMod_TerrainsUrbanNew
  - HellMod_TerrainsXBase
  - HellMod_UfoTrajectories
  - HellMod_Ufopaedia
  - HellMod_UfopaediaExtra
  - HellMod_Ufos
  - HellMod_Units
  - HellMod_XCultist
  - HellMod_XL83Ufos
  - HellMod_XMIB
  - HellMod_ZListOrders_Items
  - HellMod_ZListOrders_Manufacture
  - HellMod_ZListOrders_Research
  - HellMod_ZListOrders_Ufopaedia

HellMod_Ufopaedia.rul (sample)
Spoiler:
ufopaedia:
# Alien Origins
  - id: STR_ALIEN_ORIGINS
    type_id: 7
    section: STR_ALIEN_RESEARCH_UC
    image_id: IMG_320X150_ALIEN_MARS_UFOPEDIA
    text: STR_ALIEN_ORIGINS_UFOPEDIA
    text_width: 315
    requires:
      - STR_ALIEN_ORIGINS

HellMod_UfopaediaExtra.rul (sample)
Spoiler:
extraSprites:
# Alien Missions
  - type: IMG_320X100_ALIEN_MISSIONS_UFOPEDIA
    singleImage: true
    width: 320
    height: 200
    files:
      0: Resources/HellMod/Ufopaedia/IMG_320X100_ALIEN_MISSIONS_UFOPEDIA.PNG

# Alien Mars
  - type: IMG_320X150_ALIEN_MARS_UFOPEDIA
    singleImage: true
    width: 320
    height: 200
    files:
      0: Resources/HellMod/Ufopaedia/IMG_320X150_ALIEN_MARS_UFOPEDIA.PNG

EDIT : this works ! I just added a Step1 and Step2 ruleset, the first one in charge of "deleting" ufopaedia entries
Nice !

HellMod_Ufopaedia_Step1.rul
Spoiler:
ufopaedia:
  - delete: STR_ALIEN_ORIGINS
  - delete: STR_THE_MARTIAN_SOLUTION
  - delete: STR_CYDONIA_OR_BUST
  - delete: STR_ALIEN_RESEARCH
  - delete: STR_ALIEN_HARVEST
  - delete: STR_ALIEN_ABDUCTION
  - delete: STR_ALIEN_INFILTRATION
  - delete: STR_ALIEN_BASE
  - delete: STR_ALIEN_TERROR
  - delete: STR_ALIEN_RETALIATION
  - delete: STR_ALIEN_SUPPLY

13
Work In Progress / [UFOPAEDIA] Modding Ufopaedia
« on: July 29, 2014, 01:38:28 pm »
Just to share an idea I implemented on my hell mod. Also it is more a concept for global mods (as FMP)

1) Reorganize ufopaedia entries in order to separate "advanced technologies" from "alien research" (screen shot 1)
- "Alien Artifacts" becomes "Advanced Technologies" (screen shot 2)
- "Alien Research" becomes "Alien Menace" (screen shot 3)
- Also moved Alien Items entries to "Weapons And Equipment" (screen shot 4)

2) Create ufopaedia entries for any ammunition, in order to display some description on ammo (weight, clipSize, ...) but on weapons too, regarding specific properties as autoShots, minRange, ArcingShot, Pellets, blastRadius, ...

See below

3) Finally, I am working/brain storming on a way to "display" tech tree information

See below
See then here for weaponry part

4) Another small modification : I also reworked the ufopaedia entries for crafts, to make them on same format (same position for characteristics)

See below

5) Change Alien Missions presentation

See below

6) Stats And Damage Modifiers

Adding some extra info on aliens, see below

I attached stuff for (6)


14
While testing some new facilities design using battle generator (also with "Base Defense" selected), I noticed some strange behaviour

I don't know if it's an issue or not, I just warn about it

Also, adding a section "facilities:" (see below) inside Battle.cfg works well
Spoiler:
  facilities:
    - type: STR_HANGAR #HG1
      x: 0
      y: 0
    - type: STR_HANGAR #HG2
      x: 2
      y: 0
    - type: STR_HANGAR #HG3
      x: 4
      y: 0
    - type: STR_ACCESS_LIFT #ACC
      x: 0
      y: 2
    - type: STR_LIVING_QUARTERS #LQ1
      x: 0
      y: 3
    - type: STR_SECURITY_ROOM #SRO
      x: 1
      y: 3
    - type: STR_LABORATORY #LAB
      x: 2
      y: 3
    - type: STR_WORKSHOP #WOR
      x: 3
      y: 3
    - type: STR_LIVING_QUARTERS #LQ2
      x: 0
      y: 4
    - type: STR_SMALL_RADAR_SYSTEM #SRS
      x: 1
      y: 4
    - type: STR_SECURITY_FORTRESS #FOR
      x: 2
      y: 4
    - type: STR_GENERAL_STORES #STO
      x: 0
      y: 5
    - type: STR_GENERAL_STORES #STO
      x: 1
      y: 5

But after execution, Battle.cfg is updated (ok)
After update, "facilities:" section becomes weird
The most surprising is it seems to work anyway

Also after execution, it is like below
Spoiler:
  facilities:
    - y: 0
      x: 0
      type: STR_HANGAR
    - x: 2
      type: STR_HANGAR
      y: 0
    - y: 0
      x: 4
      type: STR_HANGAR
    - y: 2
      x: 0
      type: STR_ACCESS_LIFT
    - y: 3
      x: 0
      type: STR_LIVING_QUARTERS
    - y: 3
      x: 1
      type: STR_SECURITY_ROOM
    - y: 3
      x: 2
      type: STR_LABORATORY
    - y: 3
      x: 3
      type: STR_WORKSHOP
    - y: 4
      x: 0
      type: STR_LIVING_QUARTERS
    - y: 4
      x: 1
      type: STR_SMALL_RADAR_SYSTEM
    - y: 4
      x: 2
      type: STR_SECURITY_FORTRESS
    - type: STR_GENERAL_STORES
      x: 0
      y: 5
    - type: STR_GENERAL_STORES
      x: 1
      y: 5

Or is it just that type, x and y may be written in any sequence ?


15
Suggestions / Making an alien race operate only at night ?
« on: July 13, 2014, 01:18:48 pm »
It's more a question than a suggestion : does someone have an idea how to make some alien race only appear at night ?


Pages: [1] 2