Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: Arulco Special Division
Re: New feature: Arulco Special Division[message #360315 is a reply to message #360313] Sun, 07 June 2020 23:59 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Sure, I'll commit a fix you come up with.


I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New feature: Arulco Special Division[message #360317 is a reply to message #360315] Mon, 08 June 2020 02:10 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
"ONROOF1" is just an enum in the code. In my opinion it has no meaning to the heli placement. On WF maps it's index 348 "FIRSTCLIFFHANG". They are just names of tileset indexes that were unoccupied.


Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: New feature: Arulco Special Division[message #360320 is a reply to message #360317] Mon, 08 June 2020 07:30 Go to previous messageGo to next message
Kitty

 
Messages:439
Registered:October 2017
Location: Germany
@silversurfer

Hm, maybe we come from different points of view and/or refer to different numbers and therefore find different conclusions.

Therefore I try again. Here is what I think how it works:

Don't know about the code, but the Index-Nr. in Ja2setdat.xml (or ja2set.dat) are connected to the sub-categories in the MapEditor (like ONROOF1 or FIRSTCLIFFHANG).

Those Index-Nrs ain't the same as the TileIndex-Nrs, but connected. The Index 70 (ONROOF1) in xml is starting with TileIndex 1689 and Index 9 (FIRSTCLIFFHANG) is starting with TileIndex 348.
(that's what I meant, when I said, we may refer to different numbers - IndexNr in the Tileset versus TileIndex)

And if a tileset has an index not filled with content, this content then will be used from the Default Tileset (0 for JA2, 50 for UB) instead, so there are no real unoccupied indexes.
But that's nitpicking, I get what you mean.

What I don't know is, can the game place the graphics for the Heli on ground, when in the tileset-definition used for the map the Heli is on roof? I don't think so.
When for example, looking at the Tileset for WF-Airport, the roofbags are at ONRROF2. If they weren't at an index in the category "roof", they wouldn't be on the roof.
At some point, the game needs a definition, where to place stuff and that's the maps, which are based on the content of their Tileset, which is defined in the ja2setdat.xml (or ja2set.dat). At least, that's how I understood (you probably know how this whole worldef.cpp and whatever else is involved are working - I'm only seeing the result).

Like I said, my point of view is from somebody with close to no knowledge about the code. It's based on what I found about Tilesets here and elsewhere in the web and trial-and-error while working with Tilesets and maps.

But at least for the MapEditor, the following seems to be a thing:


Toggle Spoiler


I'm with you, when you say the Heli can be placed at different places in the Tileset. But I don't think that each and any place (Index-Nr) can be used. Index-Nrs used for GroundTextures, Walls, Furnitures, Rest and Roofs may not work. While most categories under Terrain, like Barrels and other Junk, Rocks, Banks and Cliffs should work (not sure about Trees, I'd rather avoid them for this).

And this "may not work" is realy a "may". I haven't yet been able to produce an ingame situation where I was seeing a landed Enemy-Helicopter at Meduna Airport. Might be because it doesn't work, but might also be that I wasn't at place at the right time, dunno.

But it may just be safer to place this Heli either at the place in Index that WF uses, or replace one of the two drum01 (Barrels and other Junk) in 113.
The definition for ENEMYHELI_BASE_PARKPOSITION used in modsettings.ini also is refering to ground-level, there is no other hight-level mentioned (like ,1). That's why I think this whole roof-thingy might be a little danger prone.

[Updated on: Mon, 08 June 2020 08:10]




How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Re: New feature: Arulco Special Division[message #360323 is a reply to message #360320] Mon, 08 June 2020 11:02 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
I'm not sure how this is supposed to work anyway. We have ENEMYHELI_BASE_PARKPOSITION_1 and ENEMYHELI_BASE_PARKPOSITION_2 in Mod_Settings.ini. These are grid numbers as far as I understand, but these grid numbers are occupied by different things in different sectors. At Meduna airport the grid is unoccupied and a perfect spot to park a heli, but in another sector there might be a house at that grid or some storage container with loot. Also the heli is not at the same index in all tilesets. At Meduna airport it's at 348 "FIRSTCLIFFHANG" on WF maps. At Drassen airport it's at 399 "OSTRUCT1". Do we have to rewrite tilesets and modify all maps to get this feature working?


Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: New feature: Arulco Special Division[message #360326 is a reply to message #360323] Mon, 08 June 2020 16:56 Go to previous messageGo to next message
Kitty

 
Messages:439
Registered:October 2017
Location: Germany
@silverfurfer:

The sector where this is happening, is defined as well.

Out of mod_settings.ini:


[Enemy Heli]
; enemy heli base and park positions
ENEMYHELI_BASE_X = 3
ENEMYHELI_BASE_Y = 14

; If the tileset of the helicopter base contains helicopter graphics, they can appear in the map when they are currently at the base. Use -1 to not use
ENEMYHELI_BASE_PARKPOSITION_1			= 18475
ENEMYHELI_BASE_PARKPOSITION_2			= 18469

; heli teile index in the map tileset (see also HeliSites.xml). In changed maps, you will need at least a map editor to figure this one out
ENEMYHELI_BASE_PARK_TILEINDEX			= 1689

And out of the "Enemy Helicopter" Feature Description by Flugente:

"Provided the sector has the correct tilesets, it is also possible to destroy enemy helicopters on the ground if they are parking in their home base. For vanilla maps, I did this by adding the correct tileset to the Meduna airfield (Ja2set.dat.xml, entry 48). This also requires USE_XML_TILESETS to be TRUE."


This aspect of the feature is refering to "enemy helicopters on the ground if they are parking in their home base".

The sector (map) of this home base is defined by ENEMYHELI_BASE. The place where Heli is parking on the ground is defined by ENEMYHELI_BASE_PARKPOSITION. The graphics used for the parked Heli are taken from ENEMYHELI_BASE_PARK_TILEINDEX.

Those definitions are used in a simular way as in HeliSite.xml:


<!--  

	
	refuelSector			- refuel site coordinates.                                                            simular:  ENEMYHELI_BASE  
	
	
	refuelHeliTileIndex		- 1st Heli tile index number in map tileset.
					The 6 heli tiles must be in the same sequence as original, with 3rd & 6th tile offset         
					by 1 tile to the northeast.                                                           simular:  ENEMYHELI_BASE_PARK_TILEINDEX       
				  
	refuelHeliGridNo		- Show heli graphics when landed in sector. Require heli tiles in map tileset                 
					to display correctly. Else, will show tiles that occupies the same tile index.         simular:  ENEMYHELI_BASE_PARKPOSITION
					
	
-->

			<refuelIndex>1</refuelIndex>

			<refuelSector>
				<x>13</x>
				<y>2</y>
			</refuelSector>
			
			<refuelHeliTileIndex>399</refuelHeliTileIndex>

			<refuelHeliGridNo>9001</refuelHeliGridNo>
			
		</REFUEL>
		<REFUEL>
			<refuelIndex>2</refuelIndex>

			<refuelSector>
				<x>6</x>
				<y>9</y>
			</refuelSector>
			
			<refuelHeliTileIndex>435</refuelHeliTileIndex>

			<refuelHeliGridNo>13067</refuelHeliGridNo>
			
		</REFUEL>
	</REFUELLIST>		
</HELI_INFO>


So, those changes only take place in a certain defined sector. The landed, parked Enemy Helicopter on ground can only be destroyed in this sector (and when the tileset the sector-map is using contains Heli-graphics at place defined in mod_settings.ini). Therefore there is no need to make adjustments to other maps or tilesets.

After seeing that the HeliTileIndex in Tileset 48 is at a place that the MapEditor (and therefore the map) is using for stuff that is on roof, I asked to make sure if this is nescessary, just to be sure.

A Heli could be placed on roof, but then the definition of the gridNo for placement would require something that tells the height-level as well (like can be done with fortifications-nodes in sector fortification). But since 113-Meduna Airport has no flat roof to land anyway, putting the Heli at a non-roof place in tileset seemed reasonable to me, this will require a little change to a single tileset, while adding a height-level definition to the gridNO probably would require a amount of coding.

But at feature description for Enemy Helicopters, there are also Screenshots of a landed Heli. Given that the settings as of now are used for those, this would strongly support your point, that it doesn't matter at which TileIndex the Heli-graphics are placed. Since I don't know the code, it may be possible that this feature uses mechanisms for placements that differ from those that the MapEditor is using while creating a map.
Geez, anytime I thought to have understood something, there is a twist lurking arround the corner. I'll try some more testplays, to see if I can create the situation with a parked Heli at Meduna Airport.



How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Re: New feature: Arulco Special Division[message #360327 is a reply to message #360326] Mon, 08 June 2020 18:55 Go to previous messageGo to next message
silversurfer

 
Messages:2793
Registered:May 2009
Thanks for the explanation. I was a little confused there. Maybe more than a little... big grin
It was so long ago that I defined those mod settings for WF maps that I forgot what they were for.

Anyway, I still don't see why this specific name "ONROOF1" should interfere with placement options. To me the index was always about sorting stuff in categories in the map editor. Of course it sucks to find the heli in the roof category, it wouldn't be easier to find in walls or trees but that is just how the editor works.
I just tried to place the heli on Meduna airport on 1.13 maps. I created a flat roof and managed to place at least the body and tail on that roof. It is not possible to place the rotor because that would be one height level above the heli that does not exist. You can place anything on a roof as long as its height does not exceed one level.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: New feature: Arulco Special Division[message #360328 is a reply to message #360327] Tue, 09 June 2020 01:08 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Eh. If the enemy had helicopters that are currently not flying they are in their base. Now, the intention was that those helis are thus on the ground, so it would be a neat thing to actually see them parked. Additionally we'd be able to destroy them then.

Thus the two grid positions (for up to 2 helis parked) and the tileset index. I recall doing something to the map's tileset to tweak the heli tiles in. Maybe that got changed again over the years, I don't know, but roofs were never a part of this AT ALL.

Hmpf. I guess I have to debug and see whether this still works, and possibly fix it if not.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New feature: Arulco Special Division[message #360333 is a reply to message #360328] Tue, 09 June 2020 23:41 Go to previous messageGo to next message
Flugente

 
Messages:3509
Registered:April 2009
Location: Germany
Well, this is what I get with a normal 1.13 installation, only changes from stock are some mercs that are unrelated to map changes:

https://i.imgur.com/plSl8u7.png

USE_XML_TILESETS is TRUE, ENEMYHELI_BASE_PARK_TILEINDEX is 1689. Sooo... I don't know what you're doing, but assume it's not in stock.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New feature: Arulco Special Division[message #360412 is a reply to message #360333] Sat, 20 June 2020 23:34 Go to previous messageGo to next message
Kitty

 
Messages:439
Registered:October 2017
Location: Germany
Well, what initialy bothered me was the placement of the Helicopter in Tileset 48 (Queen's Airport).

The TileIndex used for this feature is resulting in Helicopter.sti placed under the "roofs"-section in section "buildings" of the mapEditor.
I'm not able to build a full Heli with this in the MapEditor, even when I add a building with flat roof.
That's why I was wondering if this would hinder the Enemy/ASD-Heli to be built with this feature.

As it turns out, this concern was unnescessary. The Heli at this TileIndex might be bothersome in the MapEditor, but as far as this feature goes,
the game doesn't seem to care which category in MapEditor is used.
Like Silversurver probably meant, when he said "onroof" is only a name in an enumeration and your pic also is showing.
(although the shadows seems to be missing, which of course won't affect the feature at all)

https://s1.imagebanana.com/file/200620/FvPSxqjU.jpg


Pic from MapEditor in stock 113 (8796) with xml-tilesets=true

[Updated on: Sat, 20 June 2020 23:45]




How to get: latest 1.13, 7609 and more | 7609 SCI (eng) | Compiling+SVN

I need more details. (Didi Hallervorden)

Report message to a moderator

Master Sergeant
Re: New feature: Arulco Special Division[message #362800 is a reply to message #360412] Sat, 03 April 2021 20:11 Go to previous message
rftr is currently offline rftr

 
Messages:32
Registered:August 2020
Robots have been added to the ASD as of r8956/gamedir r2585. See here: http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=362799.

Report message to a moderator

Private 1st Class
Previous Topic: New feature: Intel
Next Topic: New feature: militia resources
Goto Forum:
  


Current Time: Sat Apr 20 07:59:36 GMT+3 2024

Total time taken to generate the page: 0.01080 seconds