Forum



Berciq am 28.04.2020 14:18 #15446


Hello, I am quite a fan of this game and also a map creator, I have created (I guess) something nice - 10
campaign maps which are continuation of the basic story of Octavian.

I had idea of creating them as challenges and riddles and so they are. Playing them require at least average game
knowledge, using tricks, and many more.
For example stage where you have to manage with wood shortcut or lack of stones, or lack of space, or just about
resources or without starting with proper people or in really bad location. One stage makes impossible to beat
enemy and only solution would be running out, building ship and escaping...

I hope they are made in nice way, I tested them many times, learned few basics to show messages during game, and
also to force enemies being really tough with few starting building locations.

There is continous story, there are some character thoughts, dillemas twisted with few geographic curiosities

STORYLINE SPOILER ALERT!
https://docs.google.com/document/d/1U707NxIkNSv7SJJUgNpuNZc1F7toVSMKoWnte2MwXQY/edit?usp=sharing

2x wasteland
2x ice
6x green (with one desert and one rainforest climate)

The only thing it requires is replacing folder MISSIONS and TXT.

Direct link to High resolution image:
https://i.imgur.com/t9kHHbL.jpg

After all and my question: I want to share it for free for players like me. If there is anyone who is programmer
maybe there is chance to create additional in-game button with (Roman Campaign II) and list of new missions
inside.

Anyway, just finishing testing 3rd time final map, I will put link to download and instruction in following week,
just checking all messages english ^^

-----

LINK to (Google Drive with all updated versions of map, just throw them into game folder DATA/MAPS)
https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

If You wish to thank me for this maps in any way, just Your feedback in comment below will be best reward!
~~berciq

-----



Editiert von Berciq am 11.05.2022 10:56

Spike am 28.04.2020 18:07 #15449

Im Ruhestand
Hey Berciq,

really like the style and detail of your maps (as far as one can see). I only dislike the snow-desert contrast (3rd row, 4th column),
can't really tell why but it always looked unnatural to me.
It also feels like some areas could need some heights so the planer has something to plane ;)

I'm assisting anyone who is willing to create a campaign with their scripts, lua is fairly easy and translating most events from RTX to
LUA isn't that hard. You also have more options to enhance the mission as we have more options than the original had.

Feel free to join our discord and we can work something out :) Would be great if we could not only release the original campaign but
also some custom campaigns when all features have been added.

Looking forward to get my hands on the files ;)

---


Editiert von Spike am 29.04.2020 09:05

Berciq am 28.04.2020 23:01 #15451


This snow! I know why it bothers you xD this are ment to be white stone (chalk) cliffs like in Britan "white
cliffs of Dover". I know in real it is snow, but playing with further distance and sandy beach below it makes
sence =D



Anyway yes, this Campaign is whole, written, tested and ready to be tested by other players. If I will find time
I'll try to figure out this translation of RTX

It can be just renamed to missions XI-XX idk why I didn't thought about it earlier.

Editiert von Berciq am 28.04.2020 23:09

Predee am 13.05.2020 23:50 #15483


Hi there,

Looking forward to check this out :)

Pozdrawiam / Best Regards

---
It's Predee


Berciq am 16.05.2020 22:09 #15488


All right, here are Sc of all this 10 maps (3 are turned also to be multiplayer maps (6,9,10))
(If they are too big You can zoom out browser)

Stages 1-3






Stage 4 - Closed Pass


Stage 5 - Caldera Lake




Stage 6 - Viking Fiord




Stage 7 - Rain Forest








Stage 8 - Borders


Stage 9 - Voland


Stage 10 - Three Battles














-----

For now maps are ready, wokrs great on S2 tested 3 times each, but I have scripted them in RTX

I have no idea for now how long does it take to turn mission script from RTX to format which would work on RttR.


~Unterwald am 18.05.2020 09:05 #15489


Wow, seems like you did a great job.
Can't wait until this Campaign is ready to be played. Also love the concept of Riddles and Tricks.
Best regards!


Spike am 18.05.2020 09:57 #15490

Im Ruhestand
As said, I can help with the LUA scripting - but I'd need the files^^

---



Berciq am 12.03.2022 11:40 #15933


Hello there!

Good news! Thanks to Spike's help I managed to rewrite missions from RTX to LUA so they work in RttR! :)

Missions XI and XII are ready for testing
(they shouldn't have bugs, I played them more than 30 times)

They'll give you up to hour of fun, pay close attention on your resources,
don't be angry that You can't obtain whole map - it's not the point.
Attack wisely, sometimes you can't defeat enemy (however it is possible in both stages^^)

Hope diary will help You, you'll find story interesting and worth reading rather than skipping.
If You wish to translate it in Your language please let me know and I'll add it :)
Fell that mission is sucessfully completed when You see note that next chapter awaits You.

Have a good time playing, mayby little frustrating, but also satisfying when win :)


LINK to (Google Drive)
https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

If You wish to thank me for this maps in any way, just Your feedback in comment below will be best reward!
~~berciq

Editiert von Berciq am 12.03.2022 11:41

Spike am 12.03.2022 18:42 #15934

Im Ruhestand
Hey Berciq,

I just tested your maps and streamed it (if you are interested in watching): https://www.youtube.com/watch?v=Gcnq9WNBr0g

Mission 01:
There seems no way to win this map. I have had a look into the script, you are required to occupy the spot where the enemy HQ is. You are allied with the AI and there is no event lifting the treaty - so no way to attack.
Also having no minter in the beginning, requiring the player to build a metalworks and produce a crucible is not that good I think. If you build an armory first and use up all the iron, then you can't produce generals. I think it'd be better to simply add a minter from the beginning, rather than requiring the player to produce a cruicible. It'd be also nice to have a fisher.

Mission 02:
I triggered several events by building a lookout tower. Not sure what triggeres you have defined but having 3 statements at once is kinda strange (as those must be onExplored). I also think you can pretty much rush this map by simply attacking red and taking the enemy guardhouses. This makes no sense to me at all, because the final statement says there are more soldiers coming from the west - that implies you fully defeated the enemys in the 2nd mission, which you are not required to. You can force the AI to surrender with burning their building, like they run away in awe or something alike.

For anything else you could just watch the stream, to see how someone without knowledge plays your maps ;)

If you'd like to, I can provide you the replays.

I also asked those few souls who watched me playing those maps to also play them and give you feedback on their personal liking :)

---



Berciq am 13.03.2022 09:52 #15935


M1

Well enemy waits for Your turn (without alliance one would attack you before you build gold mine like You said in
45m).
To fight I just switch off alliance in diplomacy by clicking green box, it turns red, and then I attack ^^
no hunter, fisherman and minter is soul for soul... You have iron ore, decide what to do and pay close attention
to not waste any of little resources ;D

---

M2
I was always attacked by yellow in this stage, and in 1h17m he is so close to You that I don't get why he didn't
attack, is it triggered by something that you have 2 fortress close to each other?

When I tested this stage sending soldiers form fortress ended being attacked with just one soldier to defence and
loosing

I consider blocking catapult earlier - at the beginning of 2nd stage (because in 3rd stage due to moving to this
watchtower planns of catapult has been lost)

---

PS1: save and load worked just letters were erased ^^

PS2: I wish to set portraits but don't know how, and didn't see it in any of the campaign stages I've downloaded
just a line how it should look and I'll fix them


Berciq am 14.03.2022 09:25 #15937


So I've managed to end first stage



...with even further result than expected...


I reedited second stage and You can download new versions now, without catapult and lookout tower, and with
addons included! :)

Editiert von Berciq am 17.03.2022 13:18

Berciq am 17.03.2022 14:21 #15940


You can now download missions 11 12 and 13! (Mission 1, 2 are updated)

https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

This will be order of adding features from RTTR to following missions:



---------
If You are interested in S2 files then:

RTX files are little outdated (when I translated them to lua I didn't bother updating them with new ideas, txts
and grammar fixes), but still they are completely playabe in original S2.

Maps are just slightly different (mainly because harbor in RTTR gives more area but is also treated like military
building)
Remember that if You'd like to use my missions in S2 You'd have to REPLACE (so probably make a backup of all this
3 folders)

TXT in DATA/TXT folder,
Maps in DATA/MAPS,
RTX files put in DATA/MISSIONS.

Have a nice time playing:


https://drive.google.com/drive/folders/1RxzgSstpCkGTkPdeLUKwkA52_ccAr3n-?usp=sharing

PS: If You'd like to make them on Your own I think this was how i did it:

I used
s2edit - to create map
s2mapgen - to twist created map from swd to wld, and also to place harborbuildings
objectplacement - to put BOBS objects in specific X & Y
maptomission - where I've written scripts for stages which were translated to RTX


Editiert von Berciq am 17.03.2022 14:43

Spike am 17.03.2022 16:55 #15941

Im Ruhestand
Just played your mission: https://www.youtube.com/watch?v=EUhJfE4Q-hs

So just my personfal feedback:
- You could use the s25edit to close the gaps between mountains, so the edges wouldn't be that sharp (going from mountain to water)
- You can allow players to set addons for their liking, for example I don't like military aid, and as this is an helper addon you could allow players to disable those (same for demolish building without res etc. as in your spreadsheet)
- I was suprised why the viking didn't attack me - if he did, I'd clearly lose
- There isn't much to do, other than waiting for some buildings to finish, so it's a pretty slowish pacing for me
- There are a lot of messages, guess most of them are onExplored, which feel quite random. I understand the idea and why you put them where they are - but nearly every finished barracks resulted in a message
- building lookout towers also triggers lots of messages

Just in general regarding your addon settings - I'd rather have a consistent setting, for example enabling FoW in general, letting the player decide if he likes military aid, hitpoints etc., any non mission critical addon could be optional.

But as always, just a personal view :)

---



Berciq am 17.03.2022 23:00 #15943


Well vikings there have two enemies, you and yellow, sometimes they just fight with yellow, and thats just one
option. In S2 they always attacked me, but it wasn't that difficult to protect against them, I found out that in
RTTR enemy avoid attacks when you don't have border conflict ^^

I fixed edges of other 7 stages in s2edit but here it wasn't that possible/easy because you would have to do same
changes in all 3 different maps. If you look closely you'll see all the slight changes and that in autumn there
wasn't avalanche, it happens in winter, and in spring you see its effects, same with lake water level, snow in
mountains, river and swamps ^^

Addons will stay that way, You will be forced to them but I'll consider what you said, so for the first time they
appear they'd be obligated but in next stage you could have opportunity to quit them, however i'm not sure if
it's as easy to write as it seems...

Anyway, I'm curious of 3rd stage replay, I tried different ways but just one worked and I think You found another
way. And I want to ask if You managed to play and win in 11th and in changed 12th without catapult and lookout
tower

Is there a way to force Vikings enemy to attack You?

Great to hear feedback! I always play speedup and there is little time, all happens so quickly, that i feel
pressure and hurry ^^ but If You didn't like it then i'm afraid next stage will also be annoying for You, but in
Caldera lake for sure you will feel more free and obligated to fortify quickly

PS I'll change avatar ^^

Editiert von Berciq am 17.03.2022 23:22

Spike am 18.03.2022 12:55 #15944

Im Ruhestand
Zitat:
Addons will stay that way, You will be forced to them but I'll consider what you said, so for the first time they
appear they'd be obligated but in next stage you could have opportunity to quit them, however i'm not sure if
it's as easy to write as it seems...

Lucky me I know how to change those settings :p Anyway having optional Addons is a quite good approach for anything non legacy and not required I think. I may even help you with implementing that.

Here is the replay: https://drive.google.com/file/d/1QeYSCuXX9mcJNdffsHwMHW_DVGvbwIK0/view?usp=sharing

I did not replay the first 2 missions, but will do.

I'm honestly only waiting for the maps shown in your initial posts. Some of them had quite nice areas and designs so yeah, thats what I'm waiting for.

There is no way to force the AI to attack you. And as you said, sometimes yellow and purple fight and sometimes they don't. Thats one mechanic I personally dislike in campaigns - if you are lucky it's easy, if you are not it's hard.

One last question, would you mind either creating a PR and add them to my campaign repository or am I allowed to add them?

EDIT:
Tested them: https://www.youtube.com/watch?v=YD3pUKry5DM

Miss 01:
- The info that you should break your pact is possibly hidden, depending on your event order. I got that info when scouting yellow, yet finding gold resulted in "build a mine" rather than "break your pact". I advise to always keep the "Break the pact when you are strong enough", so maybe a two liner "Consider building a gold mine.nnBreak the pact when you are strong enough"

Miss 02:
- Is now pretty easy, are you aware that one can now scout over the mountain and simply attack that one required building? Took me few minutes now to finish that mission (see video)

EDIT 2:
Miss 03:
- You can use non shippable water for the lake - that makes sure no ship is built there

---


Editiert von Spike am 18.03.2022 14:45

Berciq am 18.03.2022 16:20 #15945


Sure You are allowed. I wanted to wait till they all be finished after testing but there's no difference :)

Brace Yourself, weekend is comming and two new stages are uploaded
Icebergs and Caldera Lake : ]


https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

PS: in 1 luck is not required but tactic in attack =D think again about attack, and I'll ensure You that with
good tactic You will win every time :P

In 2nd :/ I have no good solution, for instatnt attacking.
Maybe I should restore greenland textures (i changed them so that it really felt it become colder) then snow will
block way.

I could also restrict area of tower so AI will not occupy it. You could attack different guardhouse but then you
would have to defend yourself there for the time to build at least barracks... well that could do...

Editiert von Berciq am 18.03.2022 17:40

Spike am 18.03.2022 20:23 #15946

Im Ruhestand
Zitat:
PS: in 1 luck is not required but tactic in attack =D think again about attack, and I'll ensure You that with
good tactic You will win every time :P
When both your generals lose to an officer, which is possible, not likely but possible, you simply lost. There is no tactic to go around the fact, that a general can lose a 1v1 fight. You might attack the HQ first, which leads to the same - your 2 generals are fighting 1v1 with an officer, and they can both lose. If there is a way around the basic game mechanics I'd be happy to be enlightened :)

Zitat:
In 2nd :/ I have no good solution, for instatnt attacking.
Maybe I should restore greenland textures (i changed them so that it really felt it become colder) then snow will
block way.
Not that nice but it would work, you could place invisible object via script as static objects - that way you could build an invisible wall neither soldiers nor roads could pass. Maybe place some skeletons as well and note something like "we can't climb the mountains, it's just too cold", this kinda fits your story

---



Berciq am 18.03.2022 20:57 #15947


When both your generals lose to an officer, which is possible, not likely but possible, you simply lost. There
is no tactic to go around the fact, that a general can lose a 1v1 fight. You might attack the HQ first, which
leads to the same - your 2 generals are fighting 1v1 with an officer, and they can both lose.


You are closer and closer to the answear ^^ No way around, but a way which uses game engine just not in obivious
way.. lets say "tricks" AI before it will have time to react.

I can remind all that You already know:
You have 4 atackers in total**,
You choose time to attack,
You have two buildings that You can attack
You have different class warriors when enemy has all the same
When You are in alliance enemy doesn't hold all his forces by your border
There are 3 ways that soldier can die -2 of them are in fight and due to catapult actions...
You can save game and try different scenarios... I counted att least 16 different possibilities of attack

**(well you could also build storehouse close to fortress, destroy military building closer to HQ and split your
teritory - You'd have additional private but he'd allow to attack with private first class) but it's not a
trick I'm using ^^


I'll give You a clue: last part of the first sentence is false

-----

How to do an invisiblie wall!? step by step
And how to do notsailablewater? mayby then I could do unpassable snow like in greenland

Editiert von Berciq am 18.03.2022 21:04

Berciq am 20.03.2022 11:35 #15948


I'm sorry for inconvinience, now You can download updated X II mission
[Map for MISS_0001 must also be replaced (there is just one tree planted in differnt place but it was
necessary, mountains are still walkable:)]

It should be as challenging as I wanted it to be! :)

Try it again and test Your skills in all 5/10 missions uploaded so far!

https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

Next friday will be another 2 maps: Viking Fiord and Rainforest

Editiert von Berciq am 20.03.2022 11:47

Berciq am 25.03.2022 18:41 #15951


Hey, Please Leave feedback if you played maps! ^^

I changed:
-gold depostion and added more harbour points in Icebergs
-place when message about possible road through is shown (so it works for both places where you can put
guardhouse)
-added shipwrech (don't know why it vanished)

-erased fogofwar in caldera lake
-considered disabling catapult but left it anyway (good luck with catapult in rainforest :* )

So here are new missions:

X VI - Vikingfojrd
X VII - Rainforest


Have fun!

and please don't cry if you don't read story and don't know what to do next >.<

https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

Editiert von Berciq am 25.03.2022 18:42

Spike am 26.03.2022 11:39 #15952

Im Ruhestand
So, as always my personal Feedback

Miss 04:
https://www.youtube.com/watch?v=ej38XJclW1o
https://www.youtube.com/watch?v=YJnoAAvo3s4
- So I really hated, that you have to build guardhouses, I built a barracks first but... yeah I restarted the game
- First I pretty much linked the idea of not being able to plant treest so you had to chop existing trees - but in the end it was quite tedious for me
- I'm not sure if you wanted the player to have that minimal wood production (with 1 tree) or if thats an accident. If this was an accident, then I'd be really annyoed if I took the wrong harbor
- Are we meant to use the exploration expedition? If no, you should give the player only 2 scouts
- The target of this map wasn't that clear for me - the task was finding a harbor spot south, which I did and was able to connect to the "main" are, but that wasn't the final path
- Therefore I thought I had to fight the Viking (well, I did now anyway), therefore I was pretty annyoed by the Catapult
- Maybe disable buildings you can't build anyway (Mint, Goldmine etc)

Miss 05:
https://www.youtube.com/watch?v=bjfZ8pmIZD0
- It was a pretty linear map
- It felt more settlerish
- Compared to all other maps, this one was pretty easy
- I liked having a usefull seafaring
- I'd be better if the central vulkano mountain (which is more likely in a real vulkano as well) was one island you could actually explore)
- Sadly breaking pacts is currently a bit broken as border indicator flags are not updated, reported that already
- It's pretty sad, that attacking yellow does not result in red counter attacking, I think giving yellow some more space (and maybe) block him from expanding to red) and allowing red to build fortresses next to yellow could result in a counter attack

General:
- I'd like to have optional addons so you don't need to use non mission critical
- Just so you know, the difference between AI-Levels are APM, so an easy AI does something every 1000GF, medium 500GF and hard I don't know, maybe 100
- And a side note, one may need to improve the english translation which would improve the desire to read everything ;)

---


Editiert von Spike am 26.03.2022 11:40

Spike am 26.03.2022 11:43 #15953

Im Ruhestand
One more note: Filenames should be the same, so MISS200.lua and MISS200.wld (note both file extensions are lower case)

Code:

$ git add .
warning: LF will be replaced by CRLF in Campaign_Berciq/MISS200.lua.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Campaign_Berciq/MISS201.lua.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Campaign_Berciq/MISS202.lua.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Campaign_Berciq/MISS203.lua.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Campaign_Berciq/MISS204.lua.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Campaign_Berciq/MISS205.lua.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Campaign_Berciq/MISS206.lua.
The file will have its original line endings in your working directory

Also you should add a new line at the end of your scripts

---


Editiert von Spike am 26.03.2022 11:44

Berciq am 26.03.2022 17:01 #15954


- So I really hated, that you have to build guardhouses, I built a barracks first but... yeah I restarted the
game


I didn't expect that to hear from advanced player as the area given by each military building is always same
and
you can count what area it will give you and check if it is not better to build gh rather than barracks... And It
must be learned before rainforest. Anyway they both take 2 planks anyway..


- First I pretty much liked the idea of not being able to plant treest so you had to chop existing trees - but
in the end it was quite tedious for me


That is because you wasted tons of wood, and you had to wait for tress to grow (isn't that pretty?), that
should teach a lesson :P I allowed 1 tree production so that player wouldn't be left with no other choice than to
restart. Anyway, it was amusing because You tried to find better place for forester but didn't.. Well I did^^


- Are we meant to use the exploration expedition? If no, you should give the player only 2 scouts

Sure You are, and now with more harbor places it is even desired. I sucesfully discovere whole map it is
satisying for me :)


- The target of this map wasn't that clear for me - the task was finding a harbor spot south, which I did and
was able to connect to the "main" are, but that wasn't the final path


That is noted and I will write it few more times (so when your way is cut off by icebergs you would know that
you
have to go on to the south)


- Therefore I thought I had to fight the Viking (well, I did now anyway), therefore I was pretty annyoed by
the Catapult


So was I because You didn't have to destroy barracks if you seen that catapult will miss or didn't have to
destroy it at all, you just had to "hold the position at all cost" ^^


- Maybe disable buildings you can't build anyway (Mint, Goldmine etc)

You can build them, and so i did, If you found gold you would know that by message, and you could have same
dilemma as Octavianus if you didn't decide to conquer peacefull vikings earlier! what for? ^^

btw there is no explanation why you should loose ability to build them... and i can't even made anything in my
mind, it wouldn't also fit to original roman campaign as you just have disabled harbors and shipyards but not a
random building by no reason



-----

Miss 05:
- It was a pretty linear map
- It felt more settlerish
- Compared to all other maps, this one was pretty easy


Because you didn't fight like a man, but with catapults. I feel this as fun breaking as you just kill with one
stone one general.. and if you think about resources and buildings you need to build to train a general... it
makes everything pointless, like you'd better build 10 catapults and destroy everyone:/


- I liked having a usefull seafaring
- I'd be better if the central vulkano mountain (which is more likely in a real vulkano as well) was one island
you could actually explore)


Connecting would be an intresting idea, however this stage is about tiny colonies, anyway this exploration
middle
island sounds really interesting like "on the high seas"


- Sadly breaking pacts is currently a bit broken as border indicator flags are not updated, reported that
already


Disabling catapult will fix this, i will disable it as i see it is easy way to win.

- It's pretty sad, that attacking yellow does not result in red counter attacking, I think giving yellow some
more space (and maybe) block him from expanding to red) and allowing red to build fortresses next to yellow could
result in a counter attack.


The reason is that it worked in S2 and in RTTR doesn't both teams and possibility to build harbor close to
yellow
and having it destroyed by enemies. I would have to redraw this harbor place and i'm still considering this.

-----

- And a side note, one may need to improve the english translation which would improve the desire to read
everything ;)


:(

-----

- Filenames should be the same both file extensions are lower case

Hmmm, there was Miss200.LUA rather than Miss200.lua, i fixed it, thanks, but this new line, it should just be
empty line at the very end of scrit? after

end
<---here?--->


Editiert von Berciq am 26.03.2022 17:06

Spike am 27.03.2022 00:51 #15955

Im Ruhestand
Just saying - you don't need to defend yourself, there is no reason to.

This is just personal feedback, you can take it, ignore it, whatever. This experience is solely dependent on playstyle end expetations. I simply take everything I have and try to beat the map - I have no idea if you have added a special mechanic or something like that, so I try to lose as few soldiers as I can :)

Your campaign doesn't need to be good for everyone, keep that in mind. Also my feedback always sounds negative, although it's not meant to - this is just what I'd personally change. So, hopefully this does not discourage you. This is just the feedback of a player. Keep up your work and as always I'm also happy to assist you when having questions.

---


Editiert von Spike am 27.03.2022 01:00

Berciq am 27.03.2022 10:56 #15956


-----

- Filenames should be the same both file extensions are lower case

Hmmm, there was Miss200.LUA rather than Miss200.lua, i fixed it, thanks, but this new line, it should just be
empty line at the very end of scrpit? after

end
<---here?--->

Because I exchanged files manually and i think You are importing them with some program, that is why i cannot
check if adding empty line at the end worked or not.


end
<---so here i should add empty line and everything will be fine?--->


Spike am 27.03.2022 11:13 #15957

Im Ruhestand
Yeah, just an empty line is enough. I add them via git bash, everytime you post a new link I simply copy the complete archive and upload all files - in case you changed more.

Here are your files: https://github.com/Spikeone/RttR_Campaigns/tree/master/Campaign_Berciq

---



Berciq am 27.03.2022 11:47 #15958


I wondered if I shouldn't rename files name in case sb would like to add them to campaign and have origina I-X
and then XI to XXI

I used miss200 etc because in S2 i couldn't see any other way that to replace original missions.

In RTTR it could work but I have no idea how to put them with files name in order
because alphabetically it goes like:

I
II
III
IV - miss 4th
IX - miss 9th
V - miss 5th

VI
VII
VIII
X

on my files name would be in order as I could separate X from others

X I
X II
X III
X IV
X V
X VI
X VII
X VIII
XIX
XX
XXI

So just to not make same things twice
Shouldn't in original roman missions names start with arabic number and then original name?

1 I - Off we go
2 II - Initial contact

... but if so then it won't be enough place for full name of each map :( !

Is there any solution to this?

also if i would like to rename my files name from miss200=>miss210 then i hit conflict with world campaign names

and i feel out of ideas how to rename this this properly


Berciq am 27.03.2022 11:49 #15959


Ow. PS: there will be XXIth mission to end storyline


Spike am 27.03.2022 14:40 #15960

Im Ruhestand
There currently is no solution to this. We still haven't decided on how to implement campaign support. Depending on the initial decision there are more or less features.

Maybe you will be able to define an array which orders the map files, maybe order is defined by filename - so no decision on that yet. I am aware, that you may need to translate mapnames.

---



Spike am 27.03.2022 19:36 #15961

Im Ruhestand
Viking Fjord: https://www.youtube.com/watch?v=1mjusc6xT8k
- I liked the early fight, I was a bit slow so it nearly cost me the game :D
- As soon as I realised, that the AI is not using up any resources I had no presure to fight fast (and maybe lose some soldiers)
- If the red AI (or purple for that matter) would move closer to the player (see video on how far the AI moved) there would be more pressure on the player - I sadly had none left so it was quite clear, that this mission is won
- Maybe the player shouldn't be able to build catapults at all, thinking about this myself

Rain Forest: https://www.youtube.com/watch?v=sJY-tlTW4Z0
- I liked the idea of a swamp, which disallows anything than barracks - alhtough this is achieved by not giving much stone
- Maybe decrease burn duration (addon), makes sense as it's moist
- yellow didn't build any military building, is this expected?
- I found the swamp a bit too long
- catching up with purple also took quite long - but the fight was funny
- destroying the HQ requires you to build a military building to occupy the gate

---



Berciq am 28.03.2022 20:45 #15962


-In vikingfjord i left enemies couple of times on their own for 100k gf and each time it ended up differently,
sometimes red had 1/3 of map, sometimes yellow, but west parts of each kingdom are very often occupied by allie,
even really close to their hq.  
-I gave up on blocking number of builded sawmills and woodcutters by AI. tried like 10 different methods, none
worked. If i could manually limit number of sawmills to 2, woodcutters to 4 and foresters to 1, AI would have
place for farms etc but it is smarter and knows better :/
Thought about adding special AI level 4 for my campain maps as it would work on 8/10 stages and in 9&10th hard AI
works great as it isn't limited by many natural borders

----

- Increasing burn time in rainforest is awesome idea will add it
- Yellow should build barracks and guardhouses, will check it
- this 5,5h xD yeaaah this stage is reealy long, almost longest and there is little way to play it faster
- I redesigned battlefied few times, and this is exactly how i wanted it to be so i'm glad it was fun! :D
- I will try to push violet HQ to north west and gateway in front of it on market square so obtaining military
building won't give you acces but destroying hq then should work and you wouldn't have to build additional
barracks
- Playing without catapult could end up playing for 5 hours just to loose xD
- I always play without catapult and even with stronger army not distributed well and chaotic attacks one can
loose

Thanks for FB! Good job playing!


Spike am 28.03.2022 21:00 #15963

Im Ruhestand
Well, you can limit the buildings by counting building sites and finished buildings - should work fine. I did that once for testing. Maybe I will create an example script for such things as this is helpfull anyway I guess.

Noooo - not increasing, decreasing :D its wet, so shorter duration :x

Yeah, you are right, the catapult is somewhat the last resort one could use when failing for some reason. It's really annyoing to play for hours just for nothing.

---



Spike am 28.03.2022 22:49 #15964

Im Ruhestand
Example: https://github.com/Spikeone/RttR_Campaigns/blob/master/OtherScripts/ExampleScript_04.LUA

Might NOT work 100% for the AI as the AI possibly places all building sites at the same GF, leading to no check in between.

---


Editiert von Spike am 28.03.2022 23:10

Berciq am 29.03.2022 18:08 #15965


It doesn't work for AI or i made sth wrong:

function enforceBuildingCount(player, building, limit, notify)
    local sumBuildings = rttr:GetPlayer(1):GetNumBuildings(BLD_SAWMILL) +
rttr:GetPlayer(1):GetNumBuildingSites(BLD_SAWMILL)

    if (sumBuildings >= 1) then
            rttr:GetPlayer(1):DisableBuilding(BLD_SAWMILL)
        else
            rttr:GetPlayer(1):EnableBuilding(BLD_SAWMILL, notify)
    end
    
    if (sumBuildings >= 1) then
            rttr:GetPlayer(2):DisableBuilding(BLD_SAWMILL)
        else
            rttr:GetPlayer(2):EnableBuilding(BLD_SAWMILL, notify)
    end

    if (sumBuildings >= 1) then
            rttr:GetPlayer(3):DisableBuilding(BLD_SAWMILL)
        else
            rttr:GetPlayer(3):EnableBuilding(BLD_SAWMILL, notify)
    end
end


Spike am 29.03.2022 19:14 #15966

Im Ruhestand
You only need the call in line 35 - do not change the function itself.

so:
Code:

function onGameFrame(gf)
    enforceBuildingCount(1, BLD_SAWMILL, 1, false)
    enforceBuildingCount(2, BLD_SAWMILL, 1, false)
    enforceBuildingCount(3, BLD_SAWMILL, 1, false)
end


As said, if the AI placed more than 2 sawmills at the same GF, this won't work.

EDIT: Just tested it and worked fine for me (used BLD_SAWMILL and BLD_WOODCUTTER for my tests)

---


Editiert von Spike am 30.03.2022 13:32

Spike am 31.03.2022 13:24 #15967

Im Ruhestand
Sorry, not meant to spam but:
What was the charburner good for on the "Rainforest" map? I built them but had no use for it I guess. Maybe you need to reduce the coal amount if you really want to force the player to build them.

---



Berciq am 01.04.2022 20:23 #15968


I will.. map was created before i knew about charburner, tested few times before i could add it in script and
just 2 times with charburner. I will reduce coal resources as everyone ends with 6k food+ :)
Thanks!
I'm afraid next 2 maps will be tomorrow or sunday, they are not that long but didn't test it with water shortage
yet


Berciq am 09.04.2022 20:06 #15981


Hey!
You are right!
Another two missions are ready!
Borders and Voland!

Sorry it took so long, please don't hate me!

Test yourself when water in well dries out!

https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

Please consider borders as a compact map, that is why desert is close to greenland and to snow!
Anyway it is my favourite looking map and You can discover whole map with lookout towers
PS: catapults disabled, have fun! :)
I updated exploration in Voland to fog of war

Editiert von Berciq am 09.04.2022 22:22

~Gast am 10.04.2022 18:19 #15983


hey berciq
i already played the first five missions from your campaign
absolutely amazing what you brought to the table here
your maps are extremely well done and a great challenge
it really is a lot of fun to play
keep up the good work


Spike am 10.04.2022 19:40 #15984

Im Ruhestand
Hey, so I played your new maps ;)

So far I liked the last two missions most :)

Borders:
Video: https://www.youtube.com/watch?v=2zfBLatjfRU
- It'd be cooler if the building slot for the fortress isn't the same as for the quarry (or does the other slot work as well, rangewise?). That way the fortress could be built while still harvesting stone
- Sometimes it'd be cool to have a post message with location because I'm not always aware what's been discovered and what a message is referencing right now
- The initial message indicated, that fish isn't a desired source of food. Yet one has fishers and can build them, and they are quite helpfull. Water was no problem at all because I had piled up plenty of fish and when I finally needed water, I had enough of that
- I had a crash after saving and loading after some time (well when I started building a watchtower instead of fortess)

Voland:
Video: https://www.youtube.com/watch?v=c2jrEQkombg
- I was a bit confused that we now want to avenge Brutus and Julius - which we fought before, for me thats somewhat confusing
- The gate placement looks a bit boring, it's just on a mountain area, no decoration it seems, I'd expect some
- It'd be great to have the "destroy buildings if exhausted" addon optional, I played without it ;)

Something for the scripting:
- your "addPlayerBld" may not lead to the result you want. You use "return" in any if statement - which will jump out of the function, ignoring any following statement. Also your DisableBuilding call is using a second parameter which is not existing see: https://github.com/Return-To-The-Roots/s25client/blob/master/doc/lua/functions.md#gameplayer. You can invert your statement instead of returning, that'd be better in this case I think. Or you are trying to achieve something I missunderstand :D
- Since all AIs seem to have the same building limitation after loading, you may use if(p~=0) instead
- No need to enable the whole map for AI players
- better use if(p~=0) instead of if not (p==0)
- in your addPlayerRes function, you are using an if statement that is not needed (if(p>=0) is always true)

---


Editiert von Spike am 10.04.2022 19:41

Berciq am 10.04.2022 22:06 #15985


Borders:

- It'd be cooler if the building slot for the fortress isn't the same as for the quarry (or does the other slot
work as well, rangewise?). That way the fortress could be built while still harvesting stone

quarry working range is 10 I guess and woodcutter is 6. It is completely possible to place working quarry and
fortress at same time ^^


- Sometimes it'd be cool to have a post message with location because I'm not always aware what's been discovered
and what a message is referencing right now

either new discovered or ne occupied slot, use scouts more often and when there's nothing else to do follow
them, there is no better opportuinity than borders map :)


- The initial message indicated, that fish isn't a desired source of food. Yet one has fishers and can build
them, and they are quite helpfull. Water was no problem at all because I had piled up plenty of fish and when I
finally needed water, I had enough of that

Ow just imagine sailing for so long that only food you ate for last months were fish. I didn't wanted to
disable fishery, as there is no reason to this. Water was no problem for You as you already did know how to
resolve it and drain all water before puting anything else. For me it was unusual, i did never before play with
water shortage and ended up with farms 100%, mill 100% bakery 0. Maybe this is because i finished this map within
less game frames. Maybe i will decrease just starting fishermans and hunter to 1, you could use up iron to make
more if you wish :)


- I had a crash after saving and loading after some time (well when I started building a watchtower instead of
fortess)

This is strange, as i just today tried to add this function of yours which should save mission msgh and named it
broken version for spike. this from yesterday as all mine works perfectly fine but for me. I load them as many
times as I want but without messages and empty diary


-------

Voland:

- I was a bit confused that we now want to avenge Brutus and Julius - which we fought before, for me thats
somewhat confusing

Isn't strange fighting with your uncle who died before whole story and left whole empire in your hands? ^^
I hoped as strange as how they ended...



- The gate placement looks a bit boring, it's just on a mountain area, no decoration it seems, I'd expect some

It is! You're 100% right, I'll fix this!

- It'd be great to have the "destroy buildings if exhausted" addon optional, I played without it ;)

So it should be additional difficult for You ^^ I'm bit concerned about changing this, like sb would say: I
don't like starting game without gold I'll add it in script. or I don't like when whole map is hidden, I'll
change exploration. I'm afraid that in mission XX one would like to disable sea fights as sb may not like it.



-----

All maps were created in order for player who ended up game playing in mission X so new RttR features are
presented slowly each is described in game messages for newbies like I am.  


In original S2 with RTX without addons it is also difficult as enemies attack you at once. In borders both red
and violet attack You as soon as your quarry takes last stone pile. Purple should also attack your position taken
from red but he doesn't - it is too far for him, same happened in caldera lake, in viking fjords, in rainforest,
and in voland. I'm concrned however think this is something that will be changed in future as almost all S2
features are desired. I hope to because i would have to redraw all the maps because rttr does't work like s2 for
which all this maps were designed.

This is how looks idea of addons now.

I still consider drawing map for mission 21 (as i have idea for it but didn't test it) and ending story mission
22 (which is already ready) If I loose puropse i won't do this, as I'm tired, i wrote 50 pages story in 2 weeks
as there was deadline and i can't remember what is sleep anymore^^

Map 21 and 22 are well.. in fact 19 and 20 as maps 11-13 are slightly same but i just couldn't split it in a way
i wanted with script so that new enemy appears, you have hq moved, map changes, and naming it mission XI A, XI B
was not used just because name couldn't be longer xD
-----

Something for the scripting:
- your "addPlayerBld" may not lead to the result you want. You use "return" in any if statement - which will jump
out of the function, ignoring any following statement.
as a programming noob i mean reealy, doesn't even having basic knowledge about functions and reading all "lua
helping" scripts just makes me furious as this are things explained not for newbie but for someone who knows
already something. that is why I understood from all you've written just "your "addPlayerBld" may not lead to the
result you want. "


Also your DisableBuilding call is using a second parameter which is not existing see: https://github.com/Return-
To-The-Roots/s25client/blob/master/doc/lua/functions.md#gameplayer. You can invert your statement instead of
returning, that'd be better in this case I think. Or you are trying to achieve something I missunderstand :D
I don't even know what is first and what second parametr, what i can invert, how, and how to do this in
different way :) I'm glad that i found at least way to make script in RTX 5 years ago, make map with placed
objects, with harbors in old editor as there was really few info and had to connect them all. It is very hard for
person who never did such a things and just had ideas for new campaign.


- Since all AIs seem to have the same building limitation after loading, you may use if(p~=0) instead
Sometimes differnt enemy has different buildings disabled, it was more clear for me to know which enemy has
disabled lets say quarry because if he didn't he could decide when to attack you as brutus in borders did
building quaryy on shoe penninsula. I tried to shorten code few time but have no idea how and imagine being blind
and testing 10 differnt solutions trial and error method


- No need to enable the whole map for AI players
I have no idea what it does, when i erase it game crashes, that is why i left it

- better use if(p~=0) instead of if not (p==0)
If You say so.. I don't get difference and advantage of changing it, going back through all missions and
replacing this for hour


- in your addPlayerRes function, you are using an if statement that is not needed (if(p>=0) is always true)
I have no idea what it means, seriously I don't :(


Berciq am 10.04.2022 22:17 #15986


- in your addPlayerRes function, you are using an if statement that is not needed (if(p>=0) is always true)
I have no idea what it means, seriously I don't :(

Ow well I think I do now..
It is about Voland whan all start with same resources? I'm really proud of it as i didn't have to write 4 times
all list of goods and resources ! It works for all players as every player is =0 or has higher number,

If something looks stupid but works then it is not (THAT) stupid = D




Spike am 10.04.2022 23:21 #15987

Im Ruhestand
Zitat:
So it should be additional difficult for You ^^ I'm bit concerned about changing this, like sb would say: I
don't like starting game without gold I'll add it in script. or I don't like when whole map is hidden, I'll
change exploration. I'm afraid that in mission XX one would like to disable sea fights as sb may not like it.

There is a huge difference between addons that give you QoL features, like disable coins by default, military hitpoints, military aid etc. and addons that actually change gameplay.

It won't change anything if a player uses tool ordering or not on your missions, would it? But using inexhaustible mines would break balance. Thats why I'm only suggesting that making non important addons configurable. But as always, this is just a feedback, you aren't obliged to react to that, you can decide if you will change anything or not. Just saying what I'd personally change or like more. Others may give different feedback as they have other tastes.

Zitat:
as a programming noob i mean reealy, doesn't even having basic knowledge about functions and reading all "lua
helping" scripts just makes me furious as this are things explained not for newbie but for someone who knows
already something. that is why I understood from all you've written just "your "addPlayerBld" may not lead to the
result you want. "


I do understand that - sadly one can't create examples that fit everybodies need perfectly, I'm just trying to add anything in basic examples which people then can try to understand line by line.

Code:

if(p == 1) then
        if not( (rttr:GetPlayer(p):GetBuildingCount(BLD_BREWERY) > 0))    
        then return end
        rttr:GetPlayer(p):DisableBuilding(BLD_BREWERY, not onLoad)    
        if not( (rttr:GetPlayer(p):GetBuildingCount(BLD_METALWORKS) > 0))    
        then return end


so this is basicly the following sequence of questions and actions asked:
Example 1 (brewery count is 1)
Is the playernumber 1? => answer is yes, so continue
Is the Brewerycount for player 1 not more than 1? => answer is no, so continue
Disable Brewerey for player 1
... same for metalworks
... same for forester

Example 2 (Brewery count is 0)
Is the playernumber 1? => answer is yes, so continue
Is the Brewerycount for player 1 not more than 1? => answer is no so execute the if statement. There is a return which will leave the whole function

This means any following statement is ignored.

What you actually want is the following, isn't it?:
If the brewerycount is more than 0 then the brewery should be disabled (so limiting it after loading to 1)
Code:

if (rttr:GetPlayer(p):GetBuildingCount(BLD_BREWERY) > 0) then <- thats the question if there is at least one brewery
    rttr:GetPlayer(p):DisableBuilding(BLD_BREWERY, not onLoad)
end

So it's just translating the question to code

Also this limit code only works after loading, not while playing so I'm not sure what the exact use is here. But if you have time and are willing we can meet via discord or teamspeak and just go through your scripts.

Zitat:
I don't even know what is first and what second parametr, what i can invert, how, and how to do this in
different way :) I'm glad that i found at least way to make script in RTX 5 years ago, make map with placed
objects, with harbors in old editor as there was really few info and had to connect them all. It is very hard for
person who never did such a things and just had ideas for new campaign.

Same as above, I do understand that partly. If you for example use
Code:
!ADD_ANIMAL    6    3    41    44

you are using 4 parameters, 6 is the first, 3 the second and so on. Now in a function its the same
Code:
addPlrRes(1,2)
where you are using 2 parameters - 1 is the first and 2 is the second. But in your case the second parameter does not exist, no idea why it works but you are lucky it seems - or maybe thats the crash reason.

Zitat:
- in your addPlayerRes function, you are using an if statement that is not needed (if(p>=0) is always true)
I have no idea what it means, seriously I don't :(

Don't worry, I tried to give you some feedback on the code.

If you want to we can also have a look at your scripts. Maybe there is something not working like you'd expect it to or we could clean up some things. I for example still don't get the exact result you wanted in miss208.wld. If you want to, otherwise I will remain to playing it through and writing down what I personally think and would change.

---



Spike am 10.04.2022 23:25 #15988

Im Ruhestand
Regarding learning LUA, this is probably a good start: https://www.tutorialspoint.com/lua/lua_variables.htm

This page explains all the basics, like variables, data types, operators, loops, if-else, functions and stuff like that.

---



Spike am 10.04.2022 23:52 #15989

Im Ruhestand
And one more, I tested a bit and it rather looks like saving games is sometimes broken... so nothing with your script I guess: https://github.com/Return-To-The-Roots/s25client/issues/1520

Also added history loading for miss207: https://drive.google.com/file/d/1faUhaECux1NRwD9FcxQD2ieZwgZavwdo/view?usp=sharing

hope that helps, you can compare both files

---


Editiert von Spike am 10.04.2022 23:55

Berciq am 12.04.2022 12:32 #15990


if(p ~= 0) then
        if (rttr:GetPlayer(p):GetBuildingCount(BLD_SAWMILL) > 0) then
        rttr:GetPlayer(p):DisableBuilding(BLD_SAWMILL, not onLoad)
    end

-----

this doesn't work, all enemies have 3 sawmills each after an hour

-----

hope that helps, you can compare both files

now game crashes when loading, earlier didn't

Editiert von Berciq am 12.04.2022 12:35

Spike am 12.04.2022 13:03 #15991

Im Ruhestand
Zitat:

if(p ~= 0) then
        if (rttr:GetPlayer(p):GetBuildingCount(BLD_SAWMILL) > 0) then
        rttr:GetPlayer(p):DisableBuilding(BLD_SAWMILL, not onLoad)
    end

-----

this doesn't work, all enemies have 3 sawmills each after an hour

This function is called when starting/loading the game and only then. This means, if the AI has a sawmill at loading time, sawmills are disabled. If you want this general building limitation I can add the limitation code for you if you like.

---



Berciq am 12.04.2022 19:45 #15992


I wish AI to not have more than 1 sawmill. never ever.
when starting game i don't want it to build more than 1
when loading with 1 sawmill i don't want it to build another one


Spike am 12.04.2022 22:40 #15993

Im Ruhestand
Well - now I'm confused why 1 sawmill?

Code:
if not( (rttr:GetPlayer(p):GetBuildingCount(BLD_SAWMILL) > 2))

More than two means the AI could have 3 sawmills not one. As this is true if the AI has 3 or more sawmills (3 > 2 => thats true).

It's just like the brewery, as > 0 means more than one, so you disabled the brewery if the AI has 1 or more breweries.

Anyway, added it to your script, you can change the numbers for your liking. I added comments so hopefully it's easy to understand.

https://drive.google.com/file/d/1KvCSWC8Ltfr272SvUvrG3iyyfYjZs5MY/view?usp=sharing

---



Berciq am 13.04.2022 08:49 #15994


function onGameFrame(gf)
    enforceBuildingCount(1, BLD_BREWERY, 3, false)
    enforceBuildingCount(1, BLD_METALWORKS, 1, false)

end

But doesn't that mean that AI will do everything to build three brewerys? So instead of building armory, smelther
he will build 3 brewerys?


Berciq am 13.04.2022 08:54 #15995


Is there also way to erase as much as possible form this?

    if (p  ~= 0) then
        rttr:GetPlayer(p):SetRestrictedArea(
            nil, nil,       -- enable the whole map
                0,   0,
                0,   112,
                112, 112,
                112, 0,
            nil, nil
        )
    end

I get "you don't need duplicate nils" message
I' dont want any restricted area at all but without it game breakes


Spike am 13.04.2022 10:21 #15996

Im Ruhestand
Well, I simply removed the code - no idea what you mean by "it game breakes". The game starts fine, I let it run for 20k GF, no crashes, AI kept expanding. I also removed some unused checks and used the catapult for disabling catapults - since this is global for all players at the moment. Also Event 98 has been removed as it has no use at all (maybe lifting restrictions if there aren't any causes a crash, not sure)

https://drive.google.com/file/d/12pCl02xY64T32CPu7nVu-wMlzDIEMg8X/view?usp=sharing

Zitat:

function onGameFrame(gf)
    enforceBuildingCount(1, BLD_BREWERY, 3, false)
    enforceBuildingCount(1, BLD_METALWORKS, 1, false)

end

But doesn't that mean that AI will do everything to build three brewerys? So instead of building armory, smelther
he will build 3 brewerys?


No. The AI is not aware that there is a limit of buildings at all. The AI just "keeps playing" as it normally would. This does not really alter the AI behavior but it's capabilities. When the AI thinks "Oh, I need a 4th brewery, where can I build one?" it first checks "am I allowed to build a brewery?" and then the simple answer is no. This does not ask the AI to have that amount of buildings at all. So I think this is exactly what you need/want. The statement above says: The AI is allowed to have a MAXIMUM of 3 breweries (so 0-3) and a MAXIMUM of 1 Metalworks (so 0-1). You could replace the first parameter (the 1) with a 0 and test for yourself how it's working and feeling.

---


Editiert von Spike am 13.04.2022 10:28

Berciq am 13.04.2022 17:32 #15997


that is great explanation, i undertood : ] ! gonna test it tomorrow


Berciq am 14.04.2022 10:52 #15998


function onGameFrame(gf)
    -- for AI 1
        enforceBuildingCount(1, BLD_FORESTER, 1, false)    
        enforceBuildingCount(1, BLD_WOODCUTTER, 2, false)    
        enforceBuildingCount(1, BLD_SAWMILL, 2, false)        
        enforceBuildingCount(1, BLD_BREWERY, 1, false)
        enforceBuildingCount(1, BLD_MILL, 2, false)
        enforceBuildingCount(1, BLD_BAKERY, 2, false)
        enforceBuildingCount(1, BLD_PIGFARM, 1, false)
        enforceBuildingCount(1, BLD_SLAUGHTERHOUSE, 1, false)
        enforceBuildingCount(1, BLD_IRONSMELTER, 2, false)
        enforceBuildingCount(1, BLD_ARMORY, 2, false)
        enforceBuildingCount(1, BLD_METALWORKS, 0, false)
        enforceBuildingCount(1, BLD_MINT, 2, false)        
        enforceBuildingCount(1, BLD_SHIPYARD, 1, false)        
end

So it doesn't work exchanging (gf) with 0 also doesn't help

"attempt to call global" enforcebuildingcount' (a nil value)
bad format string


Berciq am 14.04.2022 11:07 #15999


function onGameFrame(gf)
    -- for AI 1
        enforceBuildingCount(1, BLD_FORESTER, 1, false)    
        enforceBuildingCount(1, BLD_WOODCUTTER, 2, false)    
        enforceBuildingCount(1, BLD_SAWMILL, 2, false)        
        enforceBuildingCount(1, BLD_BREWERY, 1, false)
        enforceBuildingCount(1, BLD_MILL, 2, false)
        enforceBuildingCount(1, BLD_BAKERY, 2, false)
        enforceBuildingCount(1, BLD_PIGFARM, 1, false)
        enforceBuildingCount(1, BLD_SLAUGHTERHOUSE, 1, false)
        enforceBuildingCount(1, BLD_IRONSMELTER, 2, false)
        enforceBuildingCount(1, BLD_ARMORY, 2, false)
        enforceBuildingCount(1, BLD_METALWORKS, 0, false)
        enforceBuildingCount(1, BLD_MINT, 2, false)        
        enforceBuildingCount(1, BLD_SHIPYARD, 1, false)        
end

So it doesn't work exchanging (gf) with 0 also doesn't help

"attempt to call global" enforcebuildingcount' (a nil value)
bad format string


Spike am 14.04.2022 13:01 #16000

Im Ruhestand
It works fine, I set all limitations to 1 and this is the result after 100000GF: https://i.imgur.com/KVy7tZr.png

using those values:
Code:

    -- AI is allowed to have max 1 brewery
    enforceBuildingCount(1, BLD_BREWERY, 1, false)
    -- AI is allowed to have max 1 metalworks
    enforceBuildingCount(1, BLD_METALWORKS, 1, false)
    -- AI is allowed to have max 2 forester
    enforceBuildingCount(1, BLD_FORESTER, 1, false)
    -- AI is allowed to have max 2 sawmills
    enforceBuildingCount(1, BLD_SAWMILL, 1, false)
    -- AI is allowed to have max 2 mills
    enforceBuildingCount(1, BLD_MILL, 1, false)
    -- AI is allowed to have max 2 bakeries
    enforceBuildingCount(1, BLD_BAKERY, 1, false)
    -- AI is allowed to have max 2 pigfarms
    enforceBuildingCount(1, BLD_PIGFARM, 1, false)
    -- AI is allowed to have max 2 slaughterhouses
    enforceBuildingCount(1, BLD_SLAUGHTERHOUSE, 1, false)
    -- AI is allowed to have max 4 woodcutters
    enforceBuildingCount(1, BLD_WOODCUTTER, 1, false)


It looks like you did not use the file I uploaded but copied only some parts of it. Please either use the Script provided or copy all changes.

Zitat:

"attempt to call global" enforcebuildingcount' (a nil value)
bad format string

Tells exactly what is happening. You are trying to call the function "enforceBuildingCount" but it does not exist. The reason for that is that you did not copy the function at all. Have a look at the end of the file:
Code:

function enforceBuildingCount(player, building, limit, notify)
    local sumBuildings = rttr:GetPlayer(player):GetNumBuildings(building) + rttr:GetPlayer(player):GetNumBuildingSites(building)

    if (sumBuildings >= limit) then
        rttr:GetPlayer(player):DisableBuilding(building)
    else
        rttr:GetPlayer(player):EnableBuilding(building, notify)
    end
end

Thats the function which actually does limiting at all - you didn't copy it, thus the function does not exist, the script is not working at all and neither is the limiting. I personally use Notepad++ to compare files, that might help to catch all changes. But it's still the same as in the example script I provided here: https://github.com/Spikeone/RttR_Campaigns/blob/master/OtherScripts/ExampleScript_04.LUA

As you can see it has the onGameFrame(gf) function and the enforceBuildingCount(player, building, limit, notify) function. You need both.

Zitat:
So it doesn't work exchanging (gf) with 0 also doesn't help

Well, I didn't say you should replace the gf with a 0 but the 1 with a 0.
From:
Code:

function onGameFrame(gf)
    -- for AI 1
        enforceBuildingCount(1, BLD_FORESTER, 1, false)    
        enforceBuildingCount(1, BLD_WOODCUTTER, 2, false)    
        enforceBuildingCount(1, BLD_SAWMILL, 2, false)        
        enforceBuildingCount(1, BLD_BREWERY, 1, false)
        enforceBuildingCount(1, BLD_MILL, 2, false)
        enforceBuildingCount(1, BLD_BAKERY, 2, false)
        enforceBuildingCount(1, BLD_PIGFARM, 1, false)
        enforceBuildingCount(1, BLD_SLAUGHTERHOUSE, 1, false)
        enforceBuildingCount(1, BLD_IRONSMELTER, 2, false)
        enforceBuildingCount(1, BLD_ARMORY, 2, false)
        enforceBuildingCount(1, BLD_METALWORKS, 0, false)
        enforceBuildingCount(1, BLD_MINT, 2, false)        
        enforceBuildingCount(1, BLD_SHIPYARD, 1, false)        
end

To:
Code:

function onGameFrame(gf)
    -- for Player 0 (the human player)
        enforceBuildingCount(0, BLD_FORESTER, 1, false)    
        enforceBuildingCount(0, BLD_WOODCUTTER, 2, false)    
        enforceBuildingCount(0, BLD_SAWMILL, 2, false)        
        enforceBuildingCount(0, BLD_BREWERY, 1, false)
        enforceBuildingCount(0, BLD_MILL, 2, false)
        enforceBuildingCount(0, BLD_BAKERY, 2, false)
        enforceBuildingCount(0, BLD_PIGFARM, 1, false)
        enforceBuildingCount(0, BLD_SLAUGHTERHOUSE, 1, false)
        enforceBuildingCount(0, BLD_IRONSMELTER, 2, false)
        enforceBuildingCount(0, BLD_ARMORY, 2, false)
        enforceBuildingCount(0, BLD_METALWORKS, 0, false)
        enforceBuildingCount(0, BLD_MINT, 2, false)        
        enforceBuildingCount(0, BLD_SHIPYARD, 1, false)        
end


Link to a tutorial about functions in LUA: https://www.tutorialspoint.com/lua/lua_functions.htm reding this will help understanding what the code does and what my function is good for.

---


Editiert von Spike am 14.04.2022 13:01

Berciq am 14.04.2022 13:54 #16001


I paid really close attention to all lines which were before, and didn't look beneath.
Is there any reason for this funcion to be at very end of whole script?

Now it works :)

Didn't know one can compare files function in notepad ++

https://www.tutorialspoint.com/lua/lua_functions.htm reding this will help understanding
It didn't, I read this month ago, and told what i think.
It is not written for somebody who has 0 knowledge about coding.
Reading it 20 times won't help as I simply don't get it.

I don't want to spend whole life fixing code I don't understand,
gonna just finish 2 last missions without any new "Fixes" causing more errors :)


Spike am 14.04.2022 15:41 #16002

Im Ruhestand
Zitat:
I paid really close attention to all lines which were before, and didn't look beneath.
Is there any reason for this funcion to be at very end of whole script?
Not really. Just wanted to move as few lines as possible when editing, therefore not chaning the structure you know. Also appended data is easy to notice in my opinion as you not just randomly stumble over it when scrolling to the code.

Zitat:
I don't want to spend whole life fixing code I don't understand, gonna just finish 2 last missions without any new "Fixes" causing more errors :)
When you are done I can take a look at the files and check if I find anything that probably isn't working as inteded.

---



Berciq am 17.04.2022 18:03 #16006


Hey!
Here it is,
the last mission!
...or wait
THE LAST TWO MISSIONS!?

https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

Have fun, all scripts and maps are rewrited, fixed taking in conside all your feedbacks for which I really would
love to thank You! <3

You can replay missions as they will now be more challenging :>

If you'd found any more bugs or way to set AI agression level let me know,
For now I'm not planning to add any more work :)

PS: You may consider doing mission XXII with my idea of map placed in Rome - Seven hills.
You'd start with 5 other julius and augustus from different world starting close to each other, gateway would be
between your headquarters and You should sprint to resources which wouldn't in mountains but rather on mountains
side. So flat mountains and beneath resources. I considered The Tiber River being able as endless north-south
going path and would be fun to see huge roman settlement like big crowded city. Pacts and diplomacy could be a
key to win, but early tests with six HQ spread in haxagon 7 sqm from gateway in middle weren't that optimistic as
I speedrunned with barracks. So each enemy should start with guardhouse far from enemies, but then i killed
everyone building 2 fortresses ^^ natural barriers are pointless with such a short distance, thought about lava
or rivers. Well If you think it is worth anything You can take my idea, and good luck!



Spike am 18.04.2022 12:21 #16012

Im Ruhestand
Looks like Miss220.wld is missing - or is MISS220.LUA unused? Since that'd make 11 Missions. Also MISS210.LUA and MISS210.wld do not have the same casing - but should have.

---



Berciq am 18.04.2022 22:10 #16019


1 Could You check one more time? I can see it on drive

I've overwritten existing file in any case.

-----
Bugs:
2 Seen gameplay of XX ^^ I tested it with fog of war and couldn't handle sea attacks :/
3 Gonna fix typo and ( ' ) in message

4 Gonna also check if there is possibility to disable building anything close to yellow main harbor so harbor
place surrounding couldn't be terraformed

5 Any idea what should be changed to make this mission really challenging ?

- FOG of WAR?
- EXHAUSTIBLE WELLS?

6 Played it with Team just between vikings and babylonianas but it was too easy, anyway vikings made me really
difficult times with their sea attacks but they put two roads disabling ability to build harbour, any idea how to
fix this? restricted XY so they won't put flag and road there?

7 Which of all addons would You make changable?
because first implement in voland "destroy when out of resources" stays obligatored to show this rttr feature it
could be optional in next stage

rttr:SetAddon(ADDON_MILITARY_HITPOINTS, true)    
rttr:SetAddon(ADDON_FRONTIER_DISTANCE_REACHABLE, true)
rttr:SetAddon(ADDON_CATAPULT_GRAPHICS, true)
rttr:SetAddon(ADDON_MILITARY_AID, true)    
rttr:SetAddon(ADDON_REFUND_MATERIALS, 3)
rttr:SetAddon(ADDON_TOOL_ORDERING, true)    
rttr:SetAddon(ADDON_METALWORKSBEHAVIORONZERO, true)    
rttr:SetAddon(ADDON_DEMOLITION_PROHIBITION, true)
rttr:SetAddon(ADDON_MILITARY_CONTROL, true)    
rttr:SetAddon(ADDON_MORE_ANIMALS, true)
rttr:SetAddon(ADDON_CHARBURNER, true)    
rttr:SetAddon(ADDON_BURN_DURATION, 3)    
rttr:SetAddon(ADDON_EXHAUSTIBLE_WATER, 2)
rttr:SetAddon(ADDON_DEMOLISH_BLD_WO_RES, true)
rttr:SetAddon(ADDON_SEA_ATTACK, true)

Editiert von Berciq am 18.04.2022 22:33

Spike am 19.04.2022 08:19 #16020

Im Ruhestand
1) Yes, I downloaded the file now

2) Sadly, Seafaring and Seaattacks aren't that much fun in RttR. This depends on what you are playing against - the AI will simply launch attacks at everything they see. Even using FoW doesn't help much at all - the AI will send their expeditions as soon as the spot is no longer blocked. Then when that ship arrives, the spot is scouted. If your harbor is finished then, the AI will launch an sea attack.

Therefore I'd personally not recommend using seafaring with AI, or seperating the attackable sea from resource sea. Hard to tell what's good.

4) Funny problem but in this case it served your idea, didn't it? If there was a harbor, I'd need to fight less AIs.

5) Hard to tell, Wells are exhaustible already. Maybe if you were forced to fight black first to get a harbor spot. Also having some sort of forcing the AI to build lookouttower at some specific points to scout your base harbor helps. But I'm not sure if this mission isn't hard enough as it currently is. You have the same strength as the AI and you can hardly catch up without getting islands. Fighting for any island leads to fighting all 3 enemies in the end. Until they either don't see your harbor spots anymore or they have no soldiers left for attacking.

I'm also thinking about using inexhaustible mines. That way one doesn't have to bother with giving the player enough resources to produce nearly as much soldiers as the AI. But I think this would break the map.

6) Was supprised as well, maybe create construction order?

7) I'm currently using:
Code:

function getAllowedAddons()
    return {
        ADDON_MANUAL_ROAD_ENLARGEMENT,
        ADDON_REFUND_ON_EMERGENCY,
        ADDON_CATAPULT_GRAPHICS,
        ADDON_METALWORKSBEHAVIORONZERO,
        ADDON_CUSTOM_BUILD_SEQUENCE,
        ADDON_NO_COINS_DEFAULT,
        ADDON_TOOL_ORDERING,
        ADDON_MILITARY_AID,
        ADDON_MILITARY_CONTROL,
        ADDON_MILITARY_HITPOINTS,
        ADDON_COINS_CAPTURED_BLD,
        ADDON_DEMOLISH_BLD_WO_RES,
        ADDON_DURABLE_GEOLOGIST_SIGNS
    }
end


So, feedback: https://www.youtube.com/watch?v=h4yY0UMQYfk
- I really liked the map design, it has lots of nice places and spots, so far this is the most well designed map in this campaign in my opinion :)
- It's a bit disappointing that building fortresses at good spots doesn't give more resources. Left from the players harbors, you can build a fortress, which gives more mountain but it's simply empty. Also left from the player, there is a harbor spot which has some rivers on the right. Building a fortress and passing those rivers doesn't give resources. Didn't check the map file if there is something hidden I simply didn't find
- For me it wasn't that clear what my current task is, without scouting the gate area I'd simply search for one but when reading the hint I though maybe I need to reach some shallow island

---



Berciq am 19.04.2022 09:34 #16021


How about it:
adding fog of war,

when you obtain gateway you read from it in latin, translation would be something like:
Secure area at least 14000. If you won with 3 enemies it would open, if you didn't you'd have to fight rest of
them ^^

so you'd have to destroy all enemies, quite tough, You would have to quit all their colonies
(PS all 4 enemies should have same resources, all colonies also should have simillar resources)

---

Mission XXI is just addition to story but it is possible to create there 100% infinity working settlement with
all buildings (well without metlaworks as it'd required 2 additional sources of food, 2 more mines and one more
iron smelter [however it is possible to add them... maybe i should reconsider this ^^])

And well it could also require making 100 generals and then unlock harbor and then go back home...
therefore it could be great start for next, someone else campaign

Editiert von Berciq am 19.04.2022 09:44

Spike am 19.04.2022 13:45 #16022

Im Ruhestand
The script is not loading. Looks like you added the hint for message 3 late.

There is a comma missing at the end (both en and pl), also it's misspelled, its mshg3 but should be msgh3

---



Berciq am 20.04.2022 22:50 #16030


Thanks for all suggestions,

update:

mission XXI script and it's map are slightly changed but much more fun to play! :)

In mission XX exploration has been changed to fog of war, hope it'd be better now :)


Berciq am 21.04.2022 06:30 #16031


Slight changes in map of mission XX:

smoothed some elevations,
sharpened mountains,
fixed harbor points so they won't be destroyed by planners,
added small isle for lookout tower
added castle point to get to island if enemy hides there
moved gateway closer so that you will see it when you have castle in the mountains
moved Japanesse castle place to right so you cannot catapult it all the time

Tested it and total domination is possible even without catapult but I don't know if it should be obligated in
this stage to have total domination, it'd be really hard

There has been also added oassis resque additional event giving 30 coins and 25 (swords and shields)
You can use some addons optional since begin of XXth mission as Octavian would say in XIX mission that his decret
about destroying building when out of resources is two side coin and next time he will decide about it before
settling :)

-----

ALL MISSIONS ARE AFTER BETA TESTING,
NOW YOU CAN DOWNLOAD THEM WITHOUT FEAR OF BUGS,
THAT WOULD BE ALL FROM ME, HOPE YOU'D LIKE THEM,
AND YOU'D LET ME KNOW ABOUT IT BELOW.

GLAD I COULD CREATE SOMETHING LIKE THIS,
SPECIAL THANKS TO SPIKE
WHO ANSWERED MORE THAN 60 TIMES AND HELPED TO FIND ALL BUGS

Hope that one day this could be official part of RttR :)
THAT IS ALL FROM ME <3

ONE LAST TIME:
https://drive.google.com/drive/folders/1YmL-eSWTtxH_b_CJKOokbAdMmlw0KqQn?usp=sharing

Editiert von Berciq am 24.04.2022 21:02

Berciq am 04.05.2022 17:11 #16036


There is one more thing I forgot:
How to trick AI to win every time in XI mission? :D

Simple:
1# decline alliance
2# quickly send one weak attacker to attack enemys headquarter
3# after he make few steps send All best forces You got (2 generals one officer)

what will happen?

-In enemys guardhouse is only one soldier so nobody will go out
-From enemy HQ officer will go out to stop your private (or priv II class)
-From HQ another officer will go out to stop your first General
-Noone will stop your second General and he will directily attack enemies HQ
-After him your officer will also wait for attack
-Enemys first officer kills your weak attacker but he is also weakened

What will be next?

-First general fights with officer (he has advantage)
-Second general fights with officer at enemys HQ gate (he has advantage)
-Your officer is waiting he will either kill weakened officer after general, or after weak attacker (in both
cases he has advantage)
-Even when enemys officer will kill Your private he will wait to end of fight to go back to HQ or will be stopped
by other general
-When You burn enemys HQ then even if their officers would win they will have nowhere to go and die as errant
knight (3rd way of how to kill enemys soldier)
-Guardhouse is still untouched

Then?

You wait for your soldiers, heal them and take Guardhouse
(well better save because general vs officer is not always win situation)
You can be sure if You burn all other military buildings and will be left with additional soldier, so You will
attack with General/officer and sergant

That is all, There can happen real unluck when all your soldiers die, but look that you have all advantage
attacks (well poor private ^^ )

Editiert von Berciq am 06.05.2022 18:39

Unterwald am 08.06.2022 15:23 #16053


Hey Berciq,
im playing your campaign (im the middle of voland now) and im impressed by the great amount of work that you did!
I like the details on the map, the small mini-puzzles and the thiniking outside of the box elements. the maps and the lua-script look
like a lot, a whole lotta work was well spent!

I found borders to be the hardest mission so far, almost needed to restart the mission but got lucky in the end winning the final 1v1
fight of 2 generals ;-)

It feels like back in the old days, when i played the "FanPaign" and "2ndPaign" and found the missions really tricky but fascinating.

Keep up the good work!


Berciq am 09.06.2022 09:02 #16054


It is really great to read that it gave You some nice time!

In borders I burned almost all military buildings at the end to have this few more soldiers xD




Feel free to post in English!

Antwort schreiben

Username:
Security code:
Text:

   
  Convert smilies like :), ;) etc. into small graphics?
  Convert WWW-addresses into clickable links?
  Soll Boardcode in ihrer Nachricht aktiviert werden?