sman1975
Emperor
Hello, I'm working on a mod that adds about 30 new resources to the game. Most of them come from Horem's work and Skaz' work here (https://forums.civfanatics.com/resources/resource-expansion-packs-on-map-generator.22621/).
All the resources load properly and the logs are clean. However, on a few of the new resource instances, I'm seeing things like this:
There are 2 "Hardwood" and "Clay" resources in adjacent tiles. In one (on top), the model appears correctly on the map. In the other (on bottom), the resource is technically on the map, but the model does not appear.
Different model, same effect. I've tried several different models, all with similar behavior:
After I improve both of these tiles with a plantation, the "empty" tile does not show a plantation improvement, but the new resources are added to the player's holdings.
Screen grab of what happens when a visible Hardwood resource is improved:
Screen grab of what happens when an invisible Hardwood resource is improved:
The map seems to think the resource is there and is improved, it just doesn't show this properly on the map.
Please note: the resources are added properly to the player's account. Also, the Strategic View shows the correct entries for the incorrect improvement in the previous picture:
Manually adding the resources via IGE always seems to place the "visible" (correct) version of the resource. Additionally, the same errors occur on DUEL sized maps, as well as larger ones.
Here is the code used to add the resource:
Here is the ArtDefine_Landmarks entry:
I've attached a link to the working version of the mod here:
https://forums.civfanatics.com/resources/smans-the-ancient-world-at-war-awaw.28593/
Would appreciate if anyone can help me getting these resource models working more consistently.
Thanks.
All the resources load properly and the logs are clean. However, on a few of the new resource instances, I'm seeing things like this:
There are 2 "Hardwood" and "Clay" resources in adjacent tiles. In one (on top), the model appears correctly on the map. In the other (on bottom), the resource is technically on the map, but the model does not appear.
Different model, same effect. I've tried several different models, all with similar behavior:
After I improve both of these tiles with a plantation, the "empty" tile does not show a plantation improvement, but the new resources are added to the player's holdings.
Screen grab of what happens when a visible Hardwood resource is improved:
Screen grab of what happens when an invisible Hardwood resource is improved:
The map seems to think the resource is there and is improved, it just doesn't show this properly on the map.
Please note: the resources are added properly to the player's account. Also, the Strategic View shows the correct entries for the incorrect improvement in the previous picture:
Manually adding the resources via IGE always seems to place the "visible" (correct) version of the resource. Additionally, the same errors occur on DUEL sized maps, as well as larger ones.
Here is the code used to add the resource:
Code:
ALTER TABLE Resources ADD COLUMN Rivers boolean DEFAULT 0;
INSERT INTO Resources (Type, ResourceClassType, Rivers, NoRiverSide, Hills, Flatlands, MaxLatitude, Happiness, TechCityTrade, IconAtlas, PortraitIndex, ArtDefineTag, IconString, Description, Civilopedia, Help, AIObjective, AITradeModifier, ResourceUsage, PlacementOrder, ConstAppearance, MinAreaSize, Player, TilesPer, RandApp1, RandApp2, GroupRange, GroupRand, Normalize, 'Unique')
SELECT 'RESOURCE_SMAN_AWAW_HARDWOOD', 'RESOURCECLASS_RUSH', 0, 0, 1, 1, 90, 0, 'TECH_AGRICULTURE', 'SMAN_AWAW_RESOURCE_ATLAS', 0, 'ART_DEF_RESOURCE_SMAN_AWAW_HARDWOOD', '[ICON_RES_SMAN_AWAW_HARDWOOD]', 'TXT_KEY_RESOURCE_SMAN_AWAW_HARDWOOD', 'TXT_KEY_RESOURCE_SMAN_AWAW_HARDWOOD_PEDIA', 'TXT_KEY_RESOURCE_SMAN_AWAW_HARDWOOD_HELP', 2, 20, 1, 2, 50, 3, 67, 5, 25, 25, 0, 0, 0, 0 ;
Here is the ArtDefine_Landmarks entry:
Code:
INSERT INTO ArtDefine_Landmarks (Era, State, Scale, ImprovementType, LayoutHandler, ResourceType, Model, TerrainContour) VALUES
('Any', 'Any', 1, 'ART_DEF_IMPROVEMENT_NONE', 'SNAPSHOT', 'ART_DEF_RESOURCE_SMAN_AWAW_HARDWOOD', 'Pinetrees.fxsxml', 1),
('Ancient', 'Constructed', 1, 'ART_DEF_IMPROVEMENT_PLANTATION', 'SNAPSHOT', 'ART_DEF_RESOURCE_SMAN_AWAW_HARDWOOD', 'Lumbermill_MID_Pinetrees.fxsxml', 1),
('Ancient', 'UnderConstruction', 1, 'ART_DEF_IMPROVEMENT_PLANTATION', 'SNAPSHOT', 'ART_DEF_RESOURCE_SMAN_AWAW_HARDWOOD', 'Lumbermill_MID_Pinetrees_HB.fxsxml', 1),
('Ancient', 'Pillaged', 1, 'ART_DEF_IMPROVEMENT_PLANTATION', 'SNAPSHOT', 'ART_DEF_RESOURCE_SMAN_AWAW_HARDWOOD', 'Lumbermill_MID_Pinetrees_PIL.fxsxml', 1) ;--,
I've attached a link to the working version of the mod here:
https://forums.civfanatics.com/resources/smans-the-ancient-world-at-war-awaw.28593/
Would appreciate if anyone can help me getting these resource models working more consistently.
Thanks.
Last edited: