| C++ Code Access | |
|
|
|
Author | Message |
---|
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: C++ Code Access Sat Apr 06, 2013 12:25 pm | |
| Hello, I am working on creating the flowgraph for the ion cannon but I need to create some flowgraph nodes that pertain to the Command Post, and I think I need C++ access to do that. Also I wish to learn a bit more about programming in C++ and would like to see the scripts so I can figure out how they work. Is there any way I can get access to the C++ files for doing this please? | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Sat Apr 06, 2013 10:31 pm | |
| The CP is all in lua. I can extend that with flowgraph events etc. And you can create Flownodes in lua, too. sceluk is the master of keys, he can invite you to the repo. | |
|
| |
SharkYbg Polygon Smith
Posts : 137 Join date : 2012-11-04 Age : 31 Location : Bulgaria
| Subject: Re: C++ Code Access Sat Apr 06, 2013 11:21 pm | |
| Yup the scripting is in .lua. You still can open the c++ file projects though. You will need Visual Studio. You can download some kind of lite version from the main site for free . I preffer Visual Studio 2010 but you can go with 2012. Then you open the CryEngine3\Code\Solutions\CryEngine_GameCodeOnly.sln and you explore all you want. | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Sun Apr 07, 2013 12:03 am | |
| BTW, note that all this has to work in multiplayer, too. Which means you might stumble upon some problems with flowgraph. I dunno if you can send requests to the server/client in flowgraph for example. | |
|
| |
sceluk void Work();
Posts : 364 Join date : 2012-11-07
| Subject: Re: C++ Code Access Sun Apr 07, 2013 12:08 am | |
| | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Sun Apr 07, 2013 12:59 am | |
| Thanks guys, I already have been using Visual Studio Express for my coding so I'll figure out how to get it up and running.
Schlechtwetterfront, I'll see what I can do as far as singleplayer but for multiplayer I don't have any way to test it yet to make sure it works, at least not that I know of.
Sceluk, I sent you a PM of my email
I look forward to learning all the coding and the skills!! | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Sun Apr 07, 2013 6:48 am | |
| If you have problems setting up Perforce drop in on skype and I'll help you if I'm online. You can always startup another launcher.exe and connect to the first launcher instance (rememberer to start the map as server with 'map mapname s' in the console). And note that you need the Conquest game mode if you want to have a working CP. (And for that you will need to merge the battlecry folder on the megacloud with yours. | |
|
| |
sceluk void Work();
Posts : 364 Join date : 2012-11-07
| Subject: Re: C++ Code Access Mon Apr 08, 2013 12:28 am | |
| Ben, you're added in. Just need to accept. Good luck and may the Force be with ya. happy coding | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Mon Apr 08, 2013 10:23 am | |
| Thanks! I am having some problems integrating that plugin into VS Express 2012 and some other problems so I'll try to get on skype sometime to sort it out, I won't be able to tonight though | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Mon Apr 08, 2013 4:45 pm | |
| That plugin doesn't work with express versions. You need to use P4V (or the commandline if you prefer). | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Tue Apr 09, 2013 8:12 am | |
| Oh that explains it, about the P4V, which version do I install because the link brings me to a bunch of different versions that are required to be bought to use? | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Tue Apr 09, 2013 8:35 am | |
| | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Tue Apr 09, 2013 8:50 am | |
| Thanks!! Well that solves all my problems I have been having for now! | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Mon Apr 15, 2013 1:35 am | |
| I have another quick question about the flownode creation, I have been looking around for a lua version of creating a flownode on the Cryengine 3 sdk documentation however they only have the documentation for creating a hardcoded C++ flownode, Can someone help me with creating a lua version or is there something I am missing? | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Mon Apr 15, 2013 1:37 am | |
| Most of the lua entities are flownodes at the same time. I've made a 'pure' flownode though, I can post the code here later. | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Mon Apr 15, 2013 1:39 am | |
| Ok that makes sense, yeah I would like to see the code just in case the entity properties are not what I need | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Mon Apr 15, 2013 2:24 am | |
| That's a node so I could request a revive from the UI via FlowGraph events and not C++. Quite short but maybe it's enough. The structure is different from a standard entity flownode. Conquest_Conquest:RequestRevive.node in Game\Libs\Flownodes - Code:
-
<SimpleScript name="Conquest:RequestRevive" script="Scripts/StarWars/FlowNodes/RequestRevive.lua"/> RequestRevive.lua in Game\Scripts\somewhere. - Code:
-
RequestRevive = { Category = 'approved', Inputs = { {'t_Activate', 'bool'}, {'EntityId', 'entityid'}, {'ClassIndex', 'int'}, {'TeamIndex', 'int'}, {'CurrentCP', 'string'}, }, Outputs = {{'WeaponId','entityid'}}, Implementation = function(bActivate, eEntityId, iClassIndex, iTeamIndex, sCurrentCP) if g_gameRules and g_gameRules.server then g_gameRules.server:RequestRevive(eEntityId, iClassIndex, iTeamIndex, sCurrentCP) else System.Log('**** NO SERVER FOR REQUEST REVIVE') end return end }
| |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Mon Apr 15, 2013 2:33 am | |
| Thanks, this will help me a lot!
So the implementation function is what the node will perform when it is activated right? | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Mon Apr 15, 2013 2:53 am | |
| Yes, with the values of the inputs as arguments. | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Mon Apr 15, 2013 11:03 am | |
| Also is there a documented list of what these classes are cause I can't seem to find anything about them or what is available to use? - Code:
-
{'t_Activate', 'bool'}, {'EntityId', 'entityid'}, {'ClassIndex', 'int'}, {'TeamIndex', 'int'}, {'CurrentCP', 'string'}
| |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Mon Apr 15, 2013 7:24 pm | |
| bool, int, string, entityid, float (and maybe entity) should be all, IIRC. You can look up Entity and EntityId on the docs, the others are just the standard classes every language has. | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Fri Apr 19, 2013 1:33 pm | |
| Ok so I got a flownode out, really basic and not completely sure if I have done it right but I created the .node file and .lua files in their respective locations but the node isn't showing up in the flowgraph editor menu. Should I post the code? also I have found something about .lua scripting of flownodes in the documentation but it seems really vague. Cryengine 3 DocumentationAlso what is the advantages/disadvantages of using lua for flownodes compared to C++? | |
|
| |
Schlechtwetterfront
Posts : 446 Join date : 2012-11-05
| Subject: Re: C++ Code Access Fri Apr 19, 2013 5:35 pm | |
| Yeah, post the code.
Lua is slower and very restricted, you can only access scriptbinds. | |
|
| |
Ben2356
Posts : 83 Join date : 2012-11-05 Location : In a galaxy far far away....
| Subject: Re: C++ Code Access Sun Apr 21, 2013 1:40 am | |
| Ah I see, actually I was able to get the flownode working. I had forgot a comma at the end of the one of the lines but I added one and the flownode appeared in the menu. Hurray my first actually working piece of code !! I just hope it does its purpose right or I'll have to change it | |
|
| |
sceluk void Work();
Posts : 364 Join date : 2012-11-07
| Subject: Re: C++ Code Access Sun Apr 21, 2013 1:49 am | |
| great stuff. the sooner I finish my uni the beter. | |
|
| |
Sponsored content
| Subject: Re: C++ Code Access | |
| |
|
| |
| C++ Code Access | |
|