Russia mod project; a little help would be great

killmeplease

Mk Z on Steam
Joined
Nov 22, 2007
Messages
2,795
Location
Samara
Current UA is bland and encouraging ahistorical playstyle diminishing the need for expansion for Russia. Not to say kinda discriminating..

I want to keep the name but change the UA to be a more active one.
Siberian Riches: Upon capturing a barbarian camp in Medieval or Renaissance era a city is created on its place. 'Siberian' cities start with additional territory and a period of unrest. They also may provide a random Luxury Resource.

Random resource selection
if there are Forest tiles in the city's borders: 60% to get Fur
otherwise, if there is a river or lake: 60% to get Caviar
otherwise, if there are tundra tiles: 60% to get Ivory (Russia was and still is a major ivory exporter thanks to mammoth ivory)

UB: Ostrog (ex Krepost)
Courthouse replacement, cheaper to produce (100->60 hammers), +5 defense and +1 hammers
Spoiler :
Ostrog (Russian: остро́г) was a Russian term for a small fort, typically wooden and often non-permanently manned. Ostrogs were encircled by 4–6 metres high palisade walls made from sharpened trunks. The name derives from the Russian word строгать (strogat'), "to shave the wood".

From the 17th century, after the start of the Russian conquest of Siberia, the word ostrog was used to designate the forts founded in Siberia by Russian explorers. Many of these forts later transformed into large Siberian cities.

When later Siberia became a favourite destination for criminals sent there to serve katorga, Siberian ostrogs became associated with imprisonment, and in the 18th and 19th centuries the word ostrog often meant prison.


UU: Cossack
Lancer replacement, strength 22, +33% vs wounded, no maintenance cost.

'Siberian' cities list (to pick a name randomly from)
Spoiler :

Medieval
Merya
Murom
Meschera
Mari
Mordva
Veps
Perm

Renaissance
Aleut
Altai
Astrakhan
Bashkir
Buriat
Chukchi
Chulym
Chuvash
Evenk
Itelmen
Kalmyk
Kamas
Kamchadal
Kazakh
Kazan
Ket
Khakas
Khanti
Komi
Korak
Mansi
Nanai
Nenets
Sakha
Samoyed
Shor
Tuvan
Udmurt
Yakut
Yukagir


What i need
1. Caviar luxury resource icon
2. Advice in Lua coding, if someone already did something similar:
- adding a new city on the map
- adding tiles to a city
- adding a resource to a city
- determining a barb camp capture
3. your ideas/criticism
 
I heard you like caviar.


MOri9DJ.png


NqxVyP1.png
 
I do the latter, if there is another way, I would love to know as well.

i have just did it with UnitSetXY: when a camp is created, a barb unit is also put there, so we can catch this moment..
Spoiler :
Code:
local campPlots = {};
--------------------------------------------------
GameEvents.UnitSetXY.Add( checkBarbCamp );
--------------------------------------------------
function checkBarbCamp(iPlayer, iUnitID, iX, iY)
	local plot = Map.GetPlot(iX, iY);
	local player = Players[iPlayer];
	local unit = player:GetUnitByID(iUnitID);
	-- if it's a new camp - add the camp to the table
	if player:IsBarbarian() and plot:HasBarbarianCamp() then
		campPlots[plot] = 1;
		print("********** barb camp created **********");
		return;
	end
	-- the camp is cleared - remove from table
	if campPlots[plot] == 1 then
		campPlots[plot] = 0;
		print("********** barb camp cleared **********");
		if player:GetCivilizationType() ~= 15 then	-- return if the unit isnt russian
			return;
		end
		-- create a city and stuff
		player:InitCity(iX, iY);
	end
end
-------------------------------------------------

problem is, when the game is loaded, setXY isnt called. so the camps table should be saved on exit.. is there an event for this?
 
An event to save tables? I'm not sure of what you're asking really, but for persistent data, there is nothing I know that does it better than Pazyryk's TableSaverLoader.

an event on exiting the game) well it seems there's no such an event so the table should be saved on each move what makes setXY method ineffective..
 
Why do you want to save them when you exit the game? If you want to do this, the aforementioned SaverLoader fulfills this purpouse pretty well.
If you don't want the keep the SetXY function after the start of the game, make another one with Events.LoadScreenClose() that removes the first from the hook.
But then again, I don't think it will be of much use since barbarian camps keep appearing after the start of the game, which makes me even more confused about our conversation. :lol:
 
Why do you want to save them when you exit the game? If you want to do this, the aforementioned SaverLoader fulfills this purpouse pretty well.
If you don't want the keep the SetXY function after the start of the game, make another one with Events.LoadScreenClose() that removes the first from the hook.
But then again, I don't think it will be of much use since barbarian camps keep appearing after the start of the game, which makes me even more confused about our conversation. :lol:

yeah here is some misunderstanding thanks to my poor english :blush:
i have no problem in saving the table. i just need to choose a moment for this so camp locations would not be lost. doing this too frequently would slow down the game and doing this too seldom (e.g. at turn start) would lead to information loss. and i have realized i can save on "camp created" and "camp cleared" points.
 
I'm sorry for the delay; I'll get on them as soon as I have my primary computer back.
If someone offers to make icons before then, though, by all means, accept them or whatever. This is a free market. xD
 
I'm sorry for the delay; I'll get on them as soon as I have my primary computer back.
If someone offers to make icons before then, though, by all means, accept them or whatever. This is a free market. xD

ok i dont hurry you :)

i suppose the mammoth one should be given a dark background while the sable pic can be used as is

font icons are 22x22 but the atlas size in pixels should be a multiple of 8 it seems

attachment.php
 

Attachments

  • fonticons.png
    fonticons.png
    69 KB · Views: 391
  • kalmyk.jpg
    kalmyk.jpg
    35.9 KB · Views: 106
Back
Top Bottom