0.5b3 Coding Question

Here be dragons

Moderator: Moderators

0.5b3 Coding Question

Postby Gambit on Fri May 20, 2016 1:52 pm

Hello brothers of the Tyranids team.

Sometime ago, brother Miros entrusted me with your excellent b3 build for some more testing.
No need to say that I was VERY excited with the fixes and the plethora of changes!!!
And of course with the marvellous implementation of the Tyranids UI :twisted:

I am not aware of your current progress, but I would like to offer some "external" help, if I may.
It is mainly for the FreeUI mod, and the Tyranids ScAR code of brother Miros, where I want to code some updates.
These will NOT impact your mod AT ALL (NO changes required form your side), but will ensure seamless operation, for BOTH the stand-alone Tyranids mod, AND the case where it is combined with other mods. 8-)

So far, I have updated FreeUI to fully support b3 (well, brother Miros had already did that up to 99% :D ), and made some small changes to Tyranids SCaR, because it was giving some errors after save->load.

May I proceed with some other code optimisations I have in mind?
Edit: I have pre-emptively started updating the code. Already many changes (especially concerning code optimisation for speed, change players full support, error-free usage, and termination of the rules if no other Tyranid factions are in game).

Regrettably I was not able to contact brother Miros as I could in the past, that is why I made the inquiry in the public forums...

P.S.: I am sure I didn't disclose anything concerning b3 with this post. Brother Zaha, if you think this post is inappropriate, by all means, please delete it.
-In search of Papasmurf...
Gambit
Mod Team
Mod Team
 
Posts: 113
Joined: Fri Sep 30, 2011 12:25 am
Location: Athens, Greece.

Re: 0.5b3 Coding Question

Postby Miros on Mon May 23, 2016 5:33 pm

Hey Gambit!
yeah, we're still going, although very slowly. I've been pretty busy this whole semester so couldn't devote too much time for modding.

Anyway, that's some good news to hear! What have you done exactly? and what do you have in mind?

TL/DR: Help is always welcome :)
User avatar
Miros
Mod Team
Mod Team
 
Posts: 407
Joined: Fri Sep 03, 2010 11:24 pm
Location: Barcelona, Spain

Re: 0.5b3 Coding Question

Postby Gambit on Mon May 23, 2016 6:40 pm

Brother Miros!!
Glad talking to you again :D

OK, so far I have updated
1] The Tyranids.scar file so that to:
- Remove the FSE when you save->load the game.
- Fix the issue where the Change Player wincondition was not working properly (not selecting the global builder for the newly-selected race).
- Optimised many parts of the existing code so that to performs faster and with seamless operation.
- END the rules once no Tyranid player is in game + no longer the hive mind "beats" once a Tyranid player is dead :twisted:

2] The taskbar/gamescreen files, in order to:
- To re-enable full support for b3 and code a few minor tweaks.
- To add two more SCaR buttons and fix a small issue in the exiting ones .
This means that now FreeUI Fully supports all races as it should be. And the whole thing was rigorously TESTED!

TO DO
- Optimise the Tyranids SCaR code further. Since the global builder is indestructible, MANY things concerning SGroups need coded ONLY ONCE :twisted: (I have already done it for the Legions of the Damned mod). And some other things.
- Optimise FreeUI to a) work better with Change Players b) be faster and removed if necessary.

I have only two inquiries:
1] Please, grant me permission to perform the changes above, and meanwhile do not code any changes in FreeUI or the Tyranids SCaR, because we will have syncing problems... Especially the Tyranids SCaR is drastically changed - and it is gonna change even further.
Fear not, I am a "keen" coder, and although my code appears muddy, it is optimised and efficient as hell 8-)
2] There is a change I cannot code for the FreeUI :cry: (Gimme a SCaR or AI coding challenge of ANY difficulty and I will take it and get it done,... but when it comes to tasbar/gamescreen editing my skills are limited)
What we need is about the attachments placement. So far, we cannot have 6 weapons + attachment, because the to button weapons overlap with the attached leader.
So, CAN we make a change in the profile so that to allow certain races for an alternative attachment method???
And this method need be thus: The "attachment window" to move EXACTLY to its left, at the place where the squad is being reinforced.

----------------------------

Optional: Tyranids AI
I can also help you with the Tyranids AI - I specialise in exotic AI code! The thing is I am TOO stretched in many projects (do not even ask!), and my time is full! But whatever you want, I am definitely here.
Last edited by Gambit on Mon May 23, 2016 11:48 pm, edited 1 time in total.
-In search of Papasmurf...
Gambit
Mod Team
Mod Team
 
Posts: 113
Joined: Fri Sep 30, 2011 12:25 am
Location: Athens, Greece.

Re: 0.5b3 Coding Question

Postby Gambit on Mon May 23, 2016 11:46 pm

I said above (yes, now I am quoting my own posts 8-) )
TO DO
- Optimise the Tyranids SCaR code further. Since the global builder is indestructible, MANY things concerning SGroups need coded ONLY ONCE :twisted: (I have already done it for the Legions of the Damned mod). And some other things.
- Optimise FreeUI to a) work better with Change Players b) be faster and removed if necessary.
Edit: BOTH DONE!!!
The Tyranids SCaR is as fast as it can get. We are done here (but please, let me update it for any further things you guys may want to include)
And FreeUI SCaR now performs... only two calculations per circle !!! :twisted:
Brother Miros, it is a light and consistent as it can be.

There is only one small FreeUI glitch remaining. It happens ONLY in Change Players, (or if you die, and try to scroll around other players). I have told you about that already, so here it goes again:
- Some portions of the UI are not restored properly when changing players. Reason: Some buttons that are considered "default" (like the top left icon for POW, for example) are not implemented for all races, thus not re-initiated once you change from a race that has an updated button (fe Tyranids) to a race that does not...

So my FreeUI inquires are if fact two:
1] The one I said above about creating a button with a moved attachment window a bit to the left, and
2] The creation of all "default" buttons, so that change player to work flawlessly.

BOTH optional of course - they are just my suggestions for perfect FreeUI 8-)

Question:
For Quick Start games (high resources) Tyranids only get too much requisition. This is not an equal treatment (compared to other races). And since max influence is based on LPs captured, we cannot set initial influence beyond 20. You think we should leave it thus, and ignore the "unequal treatment" I said above?
Or is there an alternative I cannot think of?
-In search of Papasmurf...
Gambit
Mod Team
Mod Team
 
Posts: 113
Joined: Fri Sep 30, 2011 12:25 am
Location: Athens, Greece.

Re: 0.5b3 Coding Question

Postby Gambit on Mon Jun 06, 2016 8:37 pm

Sorry for the triple post, but I deem this necessary.

So I have optimised the Tyranids SCaR as much as I could - now it performs the least number of calculation possible. It was already perfect, so my job was simple 8-)

FreeUI
I have also optimised the code, and fixed all inconsistencies. Excellent! So the SCaR part is taken care of.
But my UI coding skills are poor, as I mentioned. Luckily a very skilled coder joined the fray!!!!

Brother Evil Isador will possibly code many RADICAL updates to the taskbar/screen (more buttons, updates to the existing, ect), so brother Miros please do not attempt to update it !!
This is not final, since the man is too busy with RL, and coding all the remaining stuff may prove very time-consuming.

Anyway, please standby, and do not code any updates in Tyranids SCaR or the FreeUI project 8-)
Deal?
-In search of Papasmurf...
Gambit
Mod Team
Mod Team
 
Posts: 113
Joined: Fri Sep 30, 2011 12:25 am
Location: Athens, Greece.

Re: 0.5b3 Coding Question

Postby Zaha on Sat Jun 11, 2016 1:57 am

That sounds like awesome work. I'm for anything that makes Miros' life easier. :P
I am the Border of Kaleidoscopic Logic
User avatar
Zaha
Site Admin
Site Admin
 
Posts: 2060
Joined: Fri Jul 11, 2008 9:20 am

Re: 0.5b3 Coding Question

Postby Gambit on Sat Jun 11, 2016 3:09 pm

Thanks for agreeing on the assistance, brother Zaha. :)
I very much like combining mods, and after seeing your excellent b3, I HAD to take care the "perfect race-mod integration" sector. :twisted:

So far, I have optimised the Tyranids SCaR, there are NO issues with MP games, save->load, change players, or anything else, and the code is impossibly faster, error-free and light as a feather!!!!

On the FreeUI front, the progress is similarly super!
Everything goes much faster, and the code is as if it is NOT there - no engine load at all.
And while SCaR/AI are my poisons, ... Taskbar editing, ain't.
For this, brother Evil Isador will possibly assist. If he finally manages to get some free time, we will be finally having fixes on some minor taskbar bugs, as well as TWO additional ScAR buttons for improved attachment (squads with 6 weapons WILL be able to receive attachments), and a huge update where races that have squads with more than 6 abilities, to have ALL of them visible.
Let's hope he will get the time!

And of course, BOTH changes have nothing to do with the Tyranid Project "itself" - so whatever updates you have performed thus far, are perfectly OK. 8-)

Bottomline, expect 100% efficiency, error-free gaming, and 100% seamless race-mod combining :twisted:

DESIGN QUESTION
On high resources (QuickStart game), Tyranids get more Requisition, as they should.
But they do not get more influence, so they are heavily handicapped compared to other races (that DO get a huge amount of Power as well).
So, do you want me to increase the Influence Recharge rate for Tyranids in the QuickStart case, to compensate ?
-In search of Papasmurf...
Gambit
Mod Team
Mod Team
 
Posts: 113
Joined: Fri Sep 30, 2011 12:25 am
Location: Athens, Greece.

Re: 0.5b3 Coding Question

Postby Zaha on Fri Jun 17, 2016 9:32 am

Hrm, interesting question.

How much Power do the other races get on QuickStart? It's been a while since I checked.
I am the Border of Kaleidoscopic Logic
User avatar
Zaha
Site Admin
Site Admin
 
Posts: 2060
Joined: Fri Jul 11, 2008 9:20 am

Re: 0.5b3 Coding Question

Postby Gambit on Fri Jun 17, 2016 10:24 pm

They get 10,000.

To compensate this, we can increase the Influence recharge rate, via the resource_per_tick_faith_modifier modifier, applied on the spore chimneys.

Note that initial Influence amount cannot be changed (the race MUST start with 20, since it initially possesses no chimney). But even if we could change it, it would be silly: Giving 100 Influence (the max possible amount) on-start is of no consequence, since it would be expended VERY soon (after one or two upgrades, and one or two buildings).
That is why the Influence RATE is the best choice by far.

So I experimented a little (both as a Tyranid player and AI observer), and I concluded that a + 0.0125 rate per spore chimney is OK.
Specifically:
Code: Select all
Modifier_ApplyToPlayer(Modifier_Create(MAT_EntityType, "resource_per_tick_faith_modifier", MUT_Addition, false, 0.0125, "tyranids_spore_chimney"), g_TyranidPlayers[i])
Brother Zaha, do you approve?

Anyway, I will include this in the updated Tyranids SCaR code, so you can modify Influence rate as you see fit, with a simple value modification. 8-)


FreeUI Update
Brother Evil Isador has coded many new taskbar goodies, so a new FreeUI version will be ready SOON :twisted:
Most of the small issues encountered in the previous versions are also fixed. (THANKS MAN!)
I have extensively play-tested the new version, and optimised the code even more.
IT IS AWESOME!
-In search of Papasmurf...
Gambit
Mod Team
Mod Team
 
Posts: 113
Joined: Fri Sep 30, 2011 12:25 am
Location: Athens, Greece.

Re: 0.5b3 Coding Question

Postby Zaha on Fri Jun 17, 2016 11:50 pm

Jesus. Yep, if they get that much then definitely up the gain rate.
I am the Border of Kaleidoscopic Logic
User avatar
Zaha
Site Admin
Site Admin
 
Posts: 2060
Joined: Fri Jul 11, 2008 9:20 am

Next

Return to Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest