|
 |
| Author |
Message |
|
Domino
|
Posted: 11 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
RxTEAM wrote: Hi, thanks Domino. You can DL the mod here : ftp://badcave.dlinkddns.com/pub/It is my private FTP server - anon login acceptet.(but only 1 at time  ) If you like you can then upload the fixed mod here too - but upload is only available for anon in the root dir ( ftp://badcave.dlinkddns.com/ ) . Regards R-TEAM Hi, just replace the shield.lua in the mod with this one.. http://www.mediafire.com/?138j6wa1xjzmfj8to allow nukes to hit the shield but also fix your shield problem with DMS. Dave.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
RxTEAM
|
Posted: 11 Apr, 2012
|
|
Joined: 02 Jun, 2010 Posts: 188
|
Hi, THANKS ! Shields now working Again  {have not testet is the "nuke collide with shields" working - but i think you know what you coding  - but curiose is the old shild.lua have 17kb and 535 rows, your rewrite have not full one kb and 29 rows ........  } And btw ... can i use it in an existing game ? As even with the new lua file - in the old game have nothing changed .... So i musst like reset the hooking or it is impossible ? Regards R-TEAM
|
|
| Top |
|
 |
|
Domino
|
Posted: 11 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, All i did was none destructively hook the shields.lua Shield class correctly, in your old mod it was destructively hooked, basicly what the original modder did was take the original shield.lua stick it in a mod in the hook folder and change 1 line of code, a bool that say true or false for nuke to to hit the shield in the oncollisioncheck function, this will have broken every shield mod that loads atfer that file... and is the reason for the DMS error... just let me explain something about hooking, just because a lua file is in a mods hook folder does not mean it is correctly hooked, there are basicly 2 parts to hooking, 1. the file you want to hook must be in the /hook folder, 2. the actual hooks are function hooks where we declare the original function inside the hooked functions.. liek this.. Code: do local OldShield = Shield Shield = Class(OldShield) {
# Return true to process this collision, false to ignore it. OnCollisionCheck = function(self,other) local CollideWithShield = OldShield.OnCollisionCheck(self, other) if not CollideWithShield and IsEnemy(self:GetArmy(),other:GetArmy()) then if EntityCategoryContains( categories.STRATEGIC, other ) and EntityCategoryContains( categories.MISSILE, other ) then CollideWithShield = true end end
return CollideWithShield end, } end so were hooking shield.lua percificly the shield class.. we declare the local OldShield = Shield this is part 1 of the hook, its a handle to the old shield class Shield = Class(OldShield) {
}there is the completed hooked function, this in its self will not have any effect on the game and the shields will work correctly, we havent actually added any new code yet, when we add new code to a function we MUST call the old code before OR after our new code.. OnCollisionCheck = function(self,other) local CollideWithShield = OldShield.OnCollisionCheck(self, other) if not CollideWithShield and IsEnemy(self:GetArmy(),other:GetArmy()) then if EntityCategoryContains( categories.STRATEGIC, other ) and EntityCategoryContains( categories.MISSILE, other ) then CollideWithShield = true end end
return CollideWithShield endthis is a correctly hooked function, notice how were calling the old code in the local CollideWithShield, were then testing the projectiles categories that impacted to see if its a strategic missile, if it is make CollideWithShield true and return the bool, this is what makes nukes collide with the shield and detonate  without effecting any other function(s) of the shield. hope that helped.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
RxTEAM
|
Posted: 12 Apr, 2012
|
|
Joined: 02 Jun, 2010 Posts: 188
|
Hi, thanks Domino for explain this  Regards R-TEAM
|
|
| Top |
|
 |
|
Domino
|
Posted: 13 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
|
| Top |
|
 |
|
Domino
|
Posted: 13 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, Ive been wanting to add this for a long its something so simple, yet seemed so hard to do, i had a little brain wave today which made it possible.. GetRolloverInfo()some of you might know this function and what it returns, it returns some basic info about the unit under the mouse, if its one of our army units we get a handle to the unit entity else we get basic info, im sure you know... so for a while ive wanted to inject more into into the table returned by this function.. like for instance.. vetlevel, a progress bars ratio, switched, numbers and general stuff from the sim which would be very handy in the userlayer.. so here is an example.. Code: INFO: info { INFO: LeechFieldMaxStorageAmount=1000, INFO: LeechFieldStorageAmount=488.69995117188, INFO: NumberOfUnitsBuilt=1, INFO: UnitHasLeechField=true, INFO: VetLevel=1, INFO: armyIndex=0, INFO: blueprintId="uel0001", INFO: customName="Domino", INFO: energyConsumed=1, INFO: energyProduced=20, INFO: energyRequested=1, INFO: entityId="0", INFO: fuelRatio=-1, INFO: health=13200, INFO: kills=27, INFO: massConsumed=0, INFO: massProduced=1, INFO: massRequested=0, INFO: maxHealth=13200, INFO: nukeSiloBuildCount=0, INFO: nukeSiloMaxStorageCount=1, INFO: nukeSiloStorageCount=0, INFO: shieldRatio=0, INFO: tacticalSiloBuildCount=0, INFO: tacticalSiloMaxStorageCount=1, INFO: tacticalSiloStorageCount=0, INFO: teamColor="ff202020", INFO: userUnit={ <metatable=table: 1A863988> INFO: _c_object=userdata: CScriptObject* at 12BDEAD8 = [CScriptObject at 0x211FE800] INFO: }, INFO: workProgress=0 INFO: } as we can see the info we can now inject into this table is a great help for the UI and user layer stuff.. this is global, we can now return this info gobally in the user/ui layer when ever there is info returned from the above function, we can also inject any and as much info as we can into the table, from the sim.. so any info available in the sim in now available in this function return. This function alone will/would have been VERY VERY usefull to a UI modder.. shame there is hardly any left around 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
luckdemon
|
Posted: 13 Apr, 2012
|
|
Joined: 08 Mar, 2012 Posts: 114 Location: Lurking somewhere around GPG forums.
|
Thats really cool! DMS just keeps getting more awesome every day  Will that be in the next release?
_________________
Domino wrote: cool beans! Beans, Domino has them, why don't you?
Domino wrote: what a load of tosh!  Beans beans, they're good for your heart, the more you eat the more you fart.
|
|
| Top |
|
 |
|
Domino
|
Posted: 13 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, luckdemon wrote: Thats really cool! DMS just keeps getting more awesome every day  Will that be in the next release? Next few days pal.. finalizing stuff now..  regarding the GetRolloverInfo() function http://pastebin.com/WGf3AWr8this is just some of the info the function now returns..  DMS syncs ALOT of unit data including ALL shield params (including num of impacts) ill add also for unit impacts and damage taken overral. with all this info is anyone expecting a really advanced unit view panel?  lol when has it ever been possible to easly get an attacker let alone all units attacking any unit.. let alone have this info synced to the userlayer.. this is FA ground breaking stuff for scripting... just when you think you have seen it all.. something amazing happens! that is all.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
Domino
|
Posted: 15 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
something ive been messing with  fluffy clouds and snow fall. http://youtu.be/uKiK8hEOzpccould maybe give a faction a weather generator structure.. however for now its just candy.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
Krapougnak
|
Posted: 15 Apr, 2012
|
|
Joined: 21 May, 2008 Posts: 706
|
Would be fine on a snow map, adds flavour, the clouids are too big though, coud cause gameplay issues. Another fine achievement you are bending the engine to your will Domino ! 
|
|
| Top |
|
 |
|
Domino
|
Posted: 15 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi pal, in the video, its extreme cloud cover usually it wouldnt be so dense, im using 5 emittors, there closely packed together, using only 2 emittors and making them further apart gives much better cloud cover that you can see through, it actually looks real! its very cool having air units fly through clouds  , it can also be used for fog on the ground..  i can also change the clouds colour and change the snow to rain, so at some point imma do some thunder and lightning clouds and have lightning hit the terrain.. OR a unit hehe.. Thx for the comment.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
luckdemon
|
Posted: 15 Apr, 2012
|
|
Joined: 08 Mar, 2012 Posts: 114 Location: Lurking somewhere around GPG forums.
|
Cloud-Cloaking?  I think large experimentals should get a low, rolling fog around their feet so they look really epic 
_________________
Domino wrote: cool beans! Beans, Domino has them, why don't you?
Domino wrote: what a load of tosh!  Beans beans, they're good for your heart, the more you eat the more you fart.
Last edited by luckdemon on 15 Apr, 2012, edited 1 time in total.
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 15 Apr, 2012
|
|
Joined: 05 Oct, 2007 Posts: 16425 Location: camping near the biggest power-up
|
|
Do you have a list of every change, and addition to the code by your mod?
I'm curious to see how far you've actually brought this thing along.
[EDIT:] I helped someone with weather a while ago, for a map they were making. It might have been Jessep. Did you just tweak the existing weather code, or invent some new stuff?
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
Domino
|
Posted: 16 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, BulletMagnet wrote: Do you have a list of every change, and addition to the code by your mod?
I'm curious to see how far you've actually brought this thing along. i dont have a full list (yet, maybe wont be a LIST so to speak) however as im going along i have actually been updating the read-me files somewhat on "somethings" the read-me's which i would think are the most important part are severely lacking in information at this time.. i concentrate on coding. as for the progress, i mentioned in a previous post that my coding skillz have increased somewhat, in that comes the kicker that i have actually updated DMS numerous times in the past betas, i added some advanced things and neat tools, DMS is now a straight support mod, quite honestly there has never been a mod like DMS, the things that are now possible are mind blowing.. if you look at the code and/or tables and wonder what it is used for just ask, ill answer any and ALL questions about how something functions and how you can use it.. obvioulsy DMS has been around for a while now and initually there were problems/bugs, the mod as a mod strived to do things none other had done.. focus got lost on what the mod should do, in the beginning the code was sloppy, the implimentation was sloppy, but workable now it has had a facelift so to speak.. yes there is alot of code and you would think with so much code in the mod that it would break lots of things, however this is NOT the case.. it really does enhance the existing code without breaking it, in that i have had to change how a few functions operate, but this does not mean ive broken them, ive added tons of new stuff, i think the main problem with this mod is that it adds more functions, which modders are not used to seeing, what we have to remember is that this mod is a scripting toolbox, so it must have new functions and new inventive ways to achieve the goal of what your modding.. i cant really explain everything that DMS can let you do, that would take forever, i have made little helper mods in the past, just to show some things, the best i can really do is posts videos of some of the things i open up in DMS, this does not mean that the thing is in DMS it just means that DMS will allow you to acheive what is in the video, if someone wants to make a mod or wants to add something to there mod/unit that they see in a DMS video, ill gladly explain how to do it, odds are its pretty easy, (basic coding knowledge required) it is a shame that this mod is not as widely used as it should be, without blowing my own horn, this mod could possibly be the best mod ever created for fa, simply because of the wide varied support and things it lets the modder achieve. BulletMagnet wrote: [EDIT:] I helped someone with weather a while ago, for a map they were making. It might have been Jessep. Did you just tweak the existing weather code, or invent some new stuff? i saw a post ages ago on the forum, someone explained how to re-enable the weather effects in fa on the map, however, the way they explained it was the long way round and geared towards mappers inserting code and tables into map saves and hooking functions ect... what i did was read the post, and make my own functions for a modder to add weather to maps, its actually quite ingenius, i took the original weather script and copied it, i then changed it a little, (will be changing it more soon to control it more via code.) so now the scripted modder weather is a completely seperate system to the original, ive created a little mod that does this.. basicly when the mouse is clicked it will show in the log the populated table params for a default weather type (clouds) with the position you clicked.. you copy paste this info from the log into a table (mapweather) which is located in /youmodname/customize/mapweather/mapweather.lua/ you can then edit the params in each weather entry to suit your needs.. you can add as many weather entries as you want, however the DEVS said do not add more than 8-16 to any map as it could blow out the particle cap.. so i limited the amount per map to 12, however for small maps 2-6 players you will not need more than 5-6 to cover the whole map if place correctly. so all you need is a mod setup (folders) and a modinfo.lua file, the only folder needed is /youmodname/customize/mapweather/mapweather.lua/ which contains the table mapweather = {} the table will contain your copy pasted weather params for the position on the map you want the weather effect to appear at. that is about it for the implimentation DMS will do the rest, it will create your weather for that map, map names will be in the weather entry params  surely it cant get any easier than that  anyway, if you look through the code and have questions just ask pal. that also applies to anyway.. 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 16 Apr, 2012
|
|
Joined: 05 Oct, 2007 Posts: 16425 Location: camping near the biggest power-up
|
|
Ahh nice, just make sure that you allow mappers to have the final say when it comes to their own maps.
I was asking about a list/API since I'd love to see someone make aircraft use ammo. instead of fuel. I've tried it myself, but got royally screwed over by that bug where once an aircraft picks a target it says on that target... forever (or until the target gets popped).
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
Domino
|
Posted: 16 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, Aye i can in a check for a flag in the senario map info, if the modder sets this token to true, no modder made map weather will be added. regards the air units using ammo, to impliment the ammo using would be easy enough, but like you say it follows the the unit it is attacking until the unit is dead, or the attacker dies, the problem is in the Attack order, there is a bug in the code, that prevents this order from being stopped, (same as the cloak bug) its actually a navigator problem, infact its not even a bug, i think they did it by design, or maybe were going to fix it in a patch... this is my best guess (and prolly correct) basicly the state in which the attacker gets the target position has a check to get the target position (to follow it/move with it) when tasks are in a state they use something called TASKSTATUS.Wait to wait 1 tick, after the wait is complete the entire state code from the start is re-run, obvioulsy while were inside the order (which is a scripttask) this check will be running ever tick for as long as the order is active and the attacker in this state, this is why we cannot issue the navigator a new position to move to, although for 1 tick it will attempt to change the position, get target position call just switches it back to the target position.. what they should have done is add in a quick check for a unit var, if its set to false then abort the order, this way we could easly jump out of orders, and it would continue with its next order... now there is a way to fix this, you could make your own attack order, (i have tried it and it works) but there are drawbacks, 1, the attack order lines (indicators) are not shown on the screen. 2, the unit would behave how you script the task when issued the order the main drawback is the attack indicators on screen, i wish i could figure these out, in a future version of DMS imma try adding some decal lines to these script orders just to see what they look like on screen it may turn out to work good, in DMS its easy to add new orders, i call them abilities (point and click on the map or unit, this was my main reason for returning the mouse world position in the sim, so that we can get units/wrecks/props ect from the mouse click area.. i also added all the functions to return such objects, just have a look at the mouse functions in unit.lua and simsync.lua they are also available across the sim layer not just in the units scripts.. almost all functions are global across the sim  although the way you call them is slightly different dependant on where you call it from.. like for instance if in a units script, we can call self:GetMousePosition() or some where outside the units script its just GetMousePosition() obvioulsy from the units script we can also just call GetMousePosition() which returns the same info  using scripttasks also allows us to create new Issue orders ive done quite a few, IssueResurrectUnit({self}, target) IssueReclaimArea({self}, position, radius) that kinda thing.. Scripttasks are very usefull and VERY cool. i aborted my new attack order because of the order indicators... however the script does work,  i can show you it if you like to give you an idea of what is involved.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 16 Apr, 2012
|
|
Joined: 05 Oct, 2007 Posts: 16425 Location: camping near the biggest power-up
|
|
Something that I had planned to check when I was trying this, was to see when/how aircraft break off an attack to repair. I don't know if they repair between targets, or (hopefully) if they break off mid-attack.
But like you said, the Navigator (and the AttackManager) are a bit broken.
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
ShadowNB
|
Posted: 16 Apr, 2012
|
|
Joined: 22 Jun, 2010 Posts: 43
|
|
For the Ammo instead of fuel, you might want to look at how ATW did it.
_________________ Shadow Night Black
|
|
| Top |
|
 |
|
Domino
|
Posted: 16 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
|
guaranteed that atw will suffer the same afflication as what bulletmagnet outlined, its either lose all order and order it to get some ammo (by whatever means) or watch your unit run out of ammo and follow the unit it is attacking until eventually some other unit kills it or you give a new order.... this is the problem once ordered to attack something it will not stop this order until you tell it to do something else.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 16 Apr, 2012
|
|
Joined: 05 Oct, 2007 Posts: 16425 Location: camping near the biggest power-up
|
ShadowNB wrote: For the Ammo instead of fuel, you might want to look at how ATW did it. I helped with ATW's fuel/ammo. Really wasn't happy with it, so I tried to remake it myself.
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
Lt_hawkeye
|
Posted: 16 Apr, 2012
|
|
Joined: 26 Mar, 2007 Posts: 5075 Location: California, United States
|
|
if you can make this weather stuff spawn at random points(modder preferance) on the map and affect gameplay/units(lightning strike taking out a unit for example or maybe snow slowing units down) without affecting overall sim speed then this is awesome
_________________ {◕ ◡ ◕}
|
|
| Top |
|
 |
|
Domino
|
Posted: 16 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, @BulletMagnet, Why not have a go at making a new attack script task, just incase i can figure out the order indicators or a replacement or some kind..  besides i think you will have fun doing it  @Lt_hawkeye This is the plan! 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 17 Apr, 2012
|
|
Joined: 05 Oct, 2007 Posts: 16425 Location: camping near the biggest power-up
|
|
Give me a few months to finish my honours project. Will probably pick up modding again then.
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
RxTEAM
|
Posted: 18 Apr, 2012
|
|
Joined: 02 Jun, 2010 Posts: 188
|
|
Hi,
have writen an bug report in your command hunker thread for this ... But have now verifyed, it is the DMS0.8beta mod which have the bug. Various UI unit buttons dissapear after an save/load ... Have this by the "Hunker" buttons by the commander and by the "set target" button from the AEON Eye of Rhianne. (cant set an target Aera to spy anymore ...) So it can happen by stock buttons too .... (have this testet WITHOUT the Hunker mod ...) With no DMS, all is right after an save/load.
Regards R-TEAM
|
|
| Top |
|
 |
|
Domino
|
Posted: 20 Apr, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
|
Hi,
@RxTeam -
ill look into this pal.. might not be fixed in this next release, but ill do my best for the next one.
thx
_________________ Domino. ______________
|
|
| Top |
|
 |
 |
 |
|