Star Wars: BattleCry
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Star Wars: BattleCry

Development forum for Star Wars: BattleCry
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log in  

 

 C++ Code Access

Go down 
4 posters
Go to page : 1, 2  Next
AuthorMessage
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: C++ Code Access   C++ Code Access EmptySat 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?
Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptySat 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.
Back to top Go down
https://sites.google.com/site/andescp/
SharkYbg
Polygon Smith



Posts : 137
Join date : 2012-11-04
Age : 31
Location : Bulgaria

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptySat 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.
Back to top Go down
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptySun 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.
Back to top Go down
https://sites.google.com/site/andescp/
sceluk
void Work();



Posts : 364
Join date : 2012-11-07

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptySun Apr 07, 2013 12:08 am

Ben, gimme your email and I'll add you to the repo. You need to make an account with assembla.
Instructions on how to get Perforce up and running are here. (Warning: bit complicated)
https://starwarsbattlecry.forumotion.co.uk/t87-code-repo-is-now-up
Back to top Go down
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptySun 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!!
Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptySun 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.
Back to top Go down
https://sites.google.com/site/andescp/
sceluk
void Work();



Posts : 364
Join date : 2012-11-07

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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 Smile
Back to top Go down
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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
Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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).
Back to top Go down
https://sites.google.com/site/andescp/
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyTue 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?
Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyTue Apr 09, 2013 8:35 am

http://www.perforce.com/downloads/Perforce-Software-Version-Management/complete_list/Customer%20Downloads
Go down to Perforce Clients and choose P4V Visual Client ('+' button).
Back to top Go down
https://sites.google.com/site/andescp/
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyTue Apr 09, 2013 8:50 am

Thanks!! Well that solves all my problems I have been having for now! Smile
Back to top Go down
http://www.moddb.com/members/starkiller2356
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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?
Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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.
Back to top Go down
https://sites.google.com/site/andescp/
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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
Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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
 }
Back to top Go down
https://sites.google.com/site/andescp/
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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?
Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon Apr 15, 2013 2:53 am

Yes, with the values of the inputs as arguments.
Back to top Go down
https://sites.google.com/site/andescp/
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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'}

Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyMon 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.
Back to top Go down
https://sites.google.com/site/andescp/
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyFri 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 Documentation

Also what is the advantages/disadvantages of using lua for flownodes compared to C++?
Back to top Go down
http://www.moddb.com/members/starkiller2356
Schlechtwetterfront

Schlechtwetterfront


Posts : 446
Join date : 2012-11-05

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptyFri Apr 19, 2013 5:35 pm

Yeah, post the code.

Lua is slower and very restricted, you can only access scriptbinds.
Back to top Go down
https://sites.google.com/site/andescp/
Ben2356




Posts : 83
Join date : 2012-11-05
Location : In a galaxy far far away....

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptySun 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 Very Happy !! I just hope it does its purpose right or I'll have to change it
Back to top Go down
http://www.moddb.com/members/starkiller2356
sceluk
void Work();



Posts : 364
Join date : 2012-11-07

C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access EmptySun Apr 21, 2013 1:49 am

great stuff. the sooner I finish my uni the beter.
Back to top Go down
Sponsored content





C++ Code Access Empty
PostSubject: Re: C++ Code Access   C++ Code Access Empty

Back to top Go down
 
C++ Code Access
Back to top 
Page 1 of 2Go to page : 1, 2  Next
 Similar topics
-
» Code Repo is Now Up

Permissions in this forum:You cannot reply to topics in this forum
Star Wars: BattleCry :: Development :: Development discussion :: Coding-
Jump to: