Map Database  •  FAQ  •  RSS  •  Register  •  Login

New Dynamic Script Ideas

<<

Krom

User avatar

KaM Remake Developer

Posts: 3149

Joined: 09 May 2006, 22:00

Location: Russia

KaM Skill Level: Fair

Post 02 Mar 2017, 14:55

Re: New Dynamic Script Ideas

As of current, KMR does not support non-linear campaigns, so opening any mission will open all preceding missions.
However it would be interesting to have such a non-linear campaign
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3819

Joined: 16 Sep 2007, 22:00

Location: Australia

KaM Skill Level: Skilled

Post 08 Mar 2017, 06:51

Re: New Dynamic Script Ideas

Non-linear campaigns would be cool. It wouldn't be that hard to implement. We could have script commands for locking/unlocking missions, and a command to set the next mission. Any other considerations/ideas?
<<

Krom

User avatar

KaM Remake Developer

Posts: 3149

Joined: 09 May 2006, 22:00

Location: Russia

KaM Skill Level: Fair

Post 08 Mar 2017, 07:04

Re: New Dynamic Script Ideas

Non-linear campaigns can generally come in 3 fashions:
1. Straight line with side-quests - player can play through ALL missions in one go. Optional side branches can be played without skipping any of the main line missions.
2. Branched - where player has to choose missions he WON'T play in this campaign.
3. Reverse-branched - where player can start with several unlocked missions, that come in parallel paths and join in the end.

Option #2 is a poor choice IMO, since it takes content from the player. In order to fully play the campaign player will have to restart it (or reload missions before branches) and break the story.
Option #3 would be quite interesting, as player now has a choice of missions to play without skipping on any of the content.

TL;DR: Campaign is more of a story/book, with a fixed story arc. But the arc can advance in parallel paths till grand final.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3819

Joined: 16 Sep 2007, 22:00

Location: Australia

KaM Skill Level: Skilled

Post 08 Mar 2017, 07:39

Re: New Dynamic Script Ideas

@Krom: I agree, and I also like Esthlos' idea of returning to your base after each mission. We should give script authors the power to implement any of these ideas. Are these commands sufficient?:
- CampaignSetNextMission(MissionNumber: Integer);
- CampaignSetLocked(MissionNumber: Integer; Locked: Boolean);

The default next mission is current mission + 1. The next mission will always be unlocked obviously. Players can still select any other unlocked mission.

Problems:
- It's not obvious when you are selecting a mission you have already played, or choosing between two paths. We probably need some indication of which missions have been played already. Especially since the flags have numbers on them (so optional side quest would show number 6, and continuing the story number 7). Probably need to not show numbers somehow in this case?
<<

Krom

User avatar

KaM Remake Developer

Posts: 3149

Joined: 09 May 2006, 22:00

Location: Russia

KaM Skill Level: Fair

Post 08 Mar 2017, 10:19

Re: New Dynamic Script Ideas

@Lewin: Sounds good to me.

We can look into adding 3rd type of mission flags: "Beaten". So there are locked missions, beaten ones and ones available-but-not-played-yet.

I think we need to allow to set custom mission tags instead of numbers, so e.g. available missions are titled A-B-C-D or 5a-5b-5c or even hidden.

I also like how this allows for seemingly endless/looped campaigns. E.g. player can fight with AIs over controlling 10-20 areas.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

thunder

User avatar

Knight

Posts: 771

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Post 08 Mar 2017, 11:00

Re: New Dynamic Script Ideas

Hello!
Could you implement a dynamic script command which could write out pareameters or values into a specified empty .csv file what the scripters could use after the games?
This file could be written out in the replay folder.
Almost like the log file of the dynamic scripted maps.
This kind of command would extend the possiblities in front of the scripters. Not in front of me. :?
<<

Strangelove

User avatar

Pikeman

Posts: 198

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 18 Aug 2017, 17:59

Re: New Dynamic Script Ideas

Optional Mission would be a very nice addition to existing and campaigns that are in the works! It would make it way easier to include additional missions without breaking anything.

thunder wrote:Hello!
Could you implement a dynamic script command which could write out pareameters or values into a specified empty .csv file what the scripters could use after the games?
This file could be written out in the replay folder.
Almost like the log file of the dynamic scripted maps.
This kind of command would extend the possiblities in front of the scripters. Not in front of me. :?


Something simular already exists. I just don't think it has been used in any campaign yet. At least not to my knowledge.
Love the Bomb!

Campaign viewtopic.php?f=5&t=1749
MultiplayerMaps viewtopic.php?f=5&t=2302
AutoComplete viewtopic.php?f=32&t=2722
<<

thunder

User avatar

Knight

Posts: 771

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Post 10 Sep 2017, 10:46

Re: New Dynamic Script Ideas

Hello!

It is not a new idea, but is there any possibility to optimalizate the OnTick event?
I had the 3rd script idea which can not use the OnTick because the massive lags. Only 1 player. and huge lags.
for example I want to observe one value in time and if that is 'mod3' than act one or two commands.
But even this simple script idea is causing massive lags.
I wanted to use this StatProducedResource states and checked it every seconds on only one specified value and caused lags..almost zero movements by units. After increased this chceking time to 10 seconds still had th same lag problem.
And as I see there are other scripts too which would use those OnTick, but seems the performance will be very bad.(just for one example the FoW script.)
This OnTick event gives the only possibility to modifie very basic things, like production times.
Is there possibility to add better performance for it?
OR could you add new event commands? For exmaple OnHouseProduced wares(HouseID:intger,ProducedWares:integer,Count:integer);

Many Thanks!

t
<<

Rey

Warrior

Posts: 121

Joined: 12 Oct 2016, 07:41

KaM Skill Level: Skilled

Post 10 Sep 2017, 11:43

Re: New Dynamic Script Ideas

Hi, t!

Can you provide short script where you have problems with lags as example? Then I will see what we can do.

Thx!
<<

sado1

User avatar

Moorbach's Guard

Posts: 1291

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 10 Sep 2017, 13:02

Re: New Dynamic Script Ideas

Are you spreading the load correctly? You are not supposed to do everything in onTick every single tick. You should have something like, if States.GameTime mod 10 = 0 then... (or mod 10 + PlayerID but it's not useful with one player), which makes the game do everything in ontick every 10 ticks instead of every 1 tick. I still want to see the example, maybe your problem is different.
<<

thunder

User avatar

Knight

Posts: 771

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Post 10 Sep 2017, 17:30

Re: New Dynamic Script Ideas

Thanks sado!
I basicly used this part from your script and used even larger values too, But I need continously monitoring one value and the furthue actions would be baseed on that. Today I could manage a bit better performance and alreadyy almost finish what I wanted to programming.
But for making better working scripts I still would need to know how can I create a matrix to store the house ids too:D
So maybe this project will be freezing a little bit. I want to check over one by one the wares state on the specified house in the array.
I would like to use array in array. :D I forgot lot about how programming.
I will try to workaround this too. :wink:
<<

Strangelove

User avatar

Pikeman

Posts: 198

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 13 Sep 2017, 18:16

Re: New Dynamic Script Ideas

Would it be possible to implement the support of some kind of library-file to put and from where you can load all your own procedures and functions? It would be quite convenient to not have to copy all that stuff in pretty much every map I make. I would also make the script files of each map much more compact and readable.
Love the Bomb!

Campaign viewtopic.php?f=5&t=1749
MultiplayerMaps viewtopic.php?f=5&t=2302
AutoComplete viewtopic.php?f=32&t=2722
<<

Ben

User avatar

Prince Lothar

Posts: 3576

Joined: 08 Jan 2009, 23:00

Location: United States of America GMT-5

KaM Skill Level: Beginner

Post 17 Sep 2017, 12:49

Re: New Dynamic Script Ideas

Strangelove wrote:Would it be possible to implement the support of some kind of library-file to put and from where you can load all your own procedures and functions? It would be quite convenient to not have to copy all that stuff in pretty much every map I make. I would also make the script files of each map much more compact and readable.


This would be really cool. Implement it just so we can nerd out!
Liberté, Égalité, KaM
<<

Rey

Warrior

Posts: 121

Joined: 12 Oct 2016, 07:41

KaM Skill Level: Skilled

Post 17 Sep 2017, 13:00

Re: New Dynamic Script Ideas

Strangelove wrote:Would it be possible to implement the support of some kind of library-file to put and from where you can load all your own procedures and functions? It would be quite convenient to not have to copy all that stuff in pretty much every map I make. I would also make the script files of each map much more compact and readable.

It's done already.
You can include scripts one into another, up to 20 depth.
Also added support for pascal style directives, smth like
  Code:
{$DEFINE SMTH}
....
{$IFDEF SMTH}
some special code
{$ENDIF}


Directives and included files are preprocessed into one script.
Also line and position (and file, since there could couple of them) are shown on any error/warning.

Not sure that directives are very usufull, but include is a very nice feature indeed.
<<

Strangelove

User avatar

Pikeman

Posts: 198

Joined: 30 Jul 2013, 06:32

KaM Skill Level: Fair

Post 17 Sep 2017, 15:05

Re: New Dynamic Script Ideas

Oh wow, didn't know it was implemented already! I have never seen anybody using it before. Is there a documentation on how to use it and if so, where can I find it?
Love the Bomb!

Campaign viewtopic.php?f=5&t=1749
MultiplayerMaps viewtopic.php?f=5&t=2302
AutoComplete viewtopic.php?f=32&t=2722
PreviousNext

Return to Ideas / Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests